@@ -113,15 +113,22 @@ jobs:
113
113
MACOSX_DEPLOYMENT_TARGET : 10.15 # minimum supported version for mac
114
114
CGO_CFLAGS : -mmacosx-version-min=10.15
115
115
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
117
124
if : matrix.os == 'macos-12'
118
125
119
126
# this will create `public/` dir with compressed full bin (<version>/<os>-<arch>.gz) and a json file
120
127
- name : Create autoupdate files
121
128
run : go-selfupdate ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
122
129
if : matrix.arch != '386' && steps.prerelease.outputs.IS_PRE != 'true'
123
130
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
125
132
- name : Copy autoupdate file for darwin-arm64 (m1 arch)
126
133
working-directory : public/
127
134
run : |
@@ -132,7 +139,7 @@ jobs:
132
139
- name : Create autoupdate files for win32
133
140
run : go-selfupdate -platform windows-${{ matrix.arch }} ${{ env.PROJECT_NAME }}${{ matrix.ext }} ${TAG_VERSION}
134
141
if : matrix.arch == '386' && matrix.os == 'windows-2019' && steps.prerelease.outputs.IS_PRE != 'true'
135
-
142
+
136
143
- name : configure aws credentials
137
144
uses : aws-actions/configure-aws-credentials@v4
138
145
with :
@@ -311,7 +318,7 @@ jobs:
311
318
run : |
312
319
wget -q https://github.com/Bearer/gon/releases/download/v0.0.27/gon_macos.zip
313
320
unzip gon_macos.zip -d /usr/local/bin
314
-
321
+
315
322
- name : Write gon config to file
316
323
run : |
317
324
cat > "${{ env.GON_CONFIG_PATH }}" <<EOF
@@ -323,7 +330,7 @@ jobs:
323
330
}
324
331
325
332
EOF
326
-
333
+
327
334
- name : Notarize app bundle
328
335
run : |
329
336
gon -log-level=debug -log-json "${{ env.GON_CONFIG_PATH }}"
@@ -449,17 +456,17 @@ jobs:
449
456
# We are hardcoding the path for signtool because is not present on the windows PATH env var by default.
450
457
# Keep in mind that this path could change when upgrading to a new runner version
451
458
SIGNTOOL_PATH : " C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe"
452
-
459
+
453
460
strategy :
454
461
matrix :
455
462
arch : [amd64, 386]
456
-
463
+
457
464
steps :
458
465
- name : Download artifact
459
466
uses : actions/download-artifact@v4
460
467
with :
461
468
name : ArduinoCreateAgent-windows-${{ matrix.arch }}
462
-
469
+
463
470
- name : Save Win signing certificate to file
464
471
run : echo "${{ secrets.INSTALLER_CERT_WINDOWS_CER }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_CER}}
465
472
@@ -468,7 +475,7 @@ jobs:
468
475
CERT_PASSWORD : ${{ secrets.INSTALLER_CERT_WINDOWS_PASSWORD }}
469
476
CONTAINER_NAME : ${{ secrets.INSTALLER_CERT_WINDOWS_CONTAINER }}
470
477
# https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing-with-safenet-etoken
471
- run : |
478
+ run : |
472
479
"${{ 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"
473
480
474
481
- name : Upload artifacts
0 commit comments