85
85
name : Notarize ${{ matrix.build.artifact-suffix }}
86
86
runs-on : macos-latest
87
87
needs : create-release-artifacts
88
- outputs :
89
- checksum-darwin_amd64 : ${{ steps.re-package.outputs.checksum-darwin_amd64 }}
90
- checksum-darwin_arm64 : ${{ steps.re-package.outputs.checksum-darwin_arm64 }}
88
+ permissions :
89
+ contents : read
91
90
92
91
env :
93
92
GON_CONFIG_PATH : gon.config.hcl
@@ -119,16 +118,12 @@ jobs:
119
118
name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
120
119
path : ${{ env.DIST_DIR }}
121
120
122
- - name : Remove non-notarized artifact
123
- uses : geekyeggo/delete-artifact@v5
124
- with :
125
- name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
126
-
127
121
- name : Import Code-Signing Certificates
128
122
env :
129
123
KEYCHAIN : " sign.keychain"
130
124
INSTALLER_CERT_MAC_PATH : " /tmp/ArduinoCerts2020.p12"
131
- KEYCHAIN_PASSWORD : keychainpassword # Arbitrary password for a keychain that exists only for the duration of the job, so not secret
125
+ # Arbitrary password for a keychain that exists only for the duration of the job, so not secret
126
+ KEYCHAIN_PASSWORD : keychainpassword
132
127
run : |
133
128
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > "${{ env.INSTALLER_CERT_MAC_PATH }}"
134
129
security create-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}"
@@ -180,20 +175,22 @@ jobs:
180
175
gon "${{ env.GON_CONFIG_PATH }}"
181
176
182
177
- name : Re-package binary
183
- id : re-package
184
178
working-directory : ${{ env.DIST_DIR }}
185
179
# Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
186
180
run : |
187
181
# GitHub's upload/download-artifact actions don't preserve file permissions,
188
182
# so we need to add execution permission back until the action is made to do this.
189
183
chmod +x "${{ env.BUILD_FOLDER }}/${{ env.PROJECT_NAME }}"
190
- tar -czvf "${{ env.PACKAGE_FILENAME }}" "${{ env.BUILD_FOLDER }}/"
184
+ tar -czvf "${{ env.PACKAGE_FILENAME }}" \
185
+ -C "${{ env.BUILD_FOLDER }}/" "${{ env.PROJECT_NAME }}" \
186
+ -C ../../ LICENSE.txt
191
187
192
- - name : Upload notarized artifact
188
+ - name : Replace artifact with notarized build
193
189
uses : actions/upload-artifact@v4
194
190
with :
195
191
if-no-files-found : error
196
192
name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
193
+ overwrite : true
197
194
path : ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}
198
195
199
196
create-release :
@@ -213,7 +210,7 @@ jobs:
213
210
pattern : ${{ env.ARTIFACT_PREFIX }}*
214
211
215
212
- name : Create checksum file
216
- working-directory : ${{ env.DIST_DIR}}
213
+ working-directory : ${{ env.DIST_DIR }}
217
214
run : |
218
215
TAG="${GITHUB_REF/refs\/tags\//}"
219
216
sha256sum ${{ env.PROJECT_NAME }}_${TAG}* > ${TAG}-checksums.txt
0 commit comments