Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b07b2bd

Browse filesBrowse files
Create a single universal executable for macos
1 parent 6220828 commit b07b2bd
Copy full SHA for b07b2bd

File tree

Expand file treeCollapse file tree

1 file changed

+16
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+16
-9
lines changed

‎.github/workflows/release.yml

Copy file name to clipboardExpand all lines: .github/workflows/release.yml
+16-9Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,22 @@ jobs:
113113
MACOSX_DEPLOYMENT_TARGET: 10.15 # minimum supported version for mac
114114
CGO_CFLAGS: -mmacosx-version-min=10.15
115115
CGO_LDFLAGS: -mmacosx-version-min=10.15
116-
run: task go:build
116+
run: |
117+
task go:build
118+
mv ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64
119+
if: matrix.os == 'macos-12'
120+
121+
- name: Create universal macos executable
122+
shell: zsh
123+
run: lipo -create -output ${{ env.PROJECT_NAME }} ${{ env.PROJECT_NAME }}_amd64
117124
if: matrix.os == 'macos-12'
118125

119126
# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
120127
- name: Create autoupdate files
121128
run: go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
122129
if: matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'
123130

124-
# for now we do not distribute m1 build, this is a workaround for now
131+
# for now we do not distribute m1 build, this is a workaround for now
125132
- name: Copy autoupdate file for darwin-arm64 (m1 arch)
126133
working-directory: public/
127134
run: |
@@ -132,7 +139,7 @@ jobs:
132139
- name: Create autoupdate files for win32
133140
run: go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
134141
if: matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
135-
142+
136143
- name: configure aws credentials
137144
uses: aws-actions/configure-aws-credentials@v4
138145
with:
@@ -311,7 +318,7 @@ jobs:
311318
run: |
312319
wget -q https://github.com/Bearer/gon/releases/download/v0.0.27/gon_macos.zip
313320
unzip gon_macos.zip -d /usr/local/bin
314-
321+
315322
- name: Write gon config to file
316323
run: |
317324
cat > "${{ env.GON_CONFIG_PATH }}" <<EOF
@@ -323,7 +330,7 @@ jobs:
323330
}
324331
325332
EOF
326-
333+
327334
- name: Notarize app bundle
328335
run: |
329336
gon -log-level=debug -log-json "${{ env.GON_CONFIG_PATH }}"
@@ -449,17 +456,17 @@ jobs:
449456
# We are hardcoding the path for signtool because is not present on the windows PATH env var by default.
450457
# Keep in mind that this path could change when upgrading to a new runner version
451458
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
452-
459+
453460
strategy:
454461
matrix:
455462
arch: [amd64, 386]
456-
463+
457464
steps:
458465
- name: Download artifact
459466
uses: actions/download-artifact@v4
460467
with:
461468
name: ArduinoCreateAgent-windows-${{ matrix.arch }}
462-
469+
463470
- name: Save Win signing certificate to file
464471
run: echo "${{ secrets.INSTALLER_CERT_WINDOWS_CER }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_CER}}
465472

@@ -468,7 +475,7 @@ jobs:
468475
CERT_PASSWORD: ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
469476
CONTAINER_NAME: ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
470477
# https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
471-
run: |
478+
run: |
472479
"${{ env.SIGNTOOL_PATH }}" sign -d "Arduino Create Agent" -f ${{ env.INSTALLER_CERT_WINDOWS_CER}} -csp "eToken Base Cryptographic Provider" -k "[{{${{ env.CERT_PASSWORD }}}}]=${{ env.CONTAINER_NAME }}" -fd sha256 -tr http://timestamp.digicert.com -td SHA256 -v "ArduinoCreateAgent-${GITHUB_REF##*/}-windows-${{ matrix.arch }}-installer.exe"
473480
474481
- name: Upload artifacts

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.