Skip to content

Commit cfef6a1

Browse files
update workflow to match the workflow-template
1 parent ad9a0f7 commit cfef6a1

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

.github/workflows/release-go-crosscompile-task.yml

+10-13
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ jobs:
8585
name: Notarize ${{ matrix.build.artifact-suffix }}
8686
runs-on: macos-latest
8787
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
9190

9291
env:
9392
GON_CONFIG_PATH: gon.config.hcl
@@ -119,16 +118,12 @@ jobs:
119118
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
120119
path: ${{ env.DIST_DIR }}
121120

122-
- name: Remove non-notarized artifact
123-
uses: geekyeggo/delete-artifact@v5
124-
with:
125-
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
126-
127121
- name: Import Code-Signing Certificates
128122
env:
129123
KEYCHAIN: "sign.keychain"
130124
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
132127
run: |
133128
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > "${{ env.INSTALLER_CERT_MAC_PATH }}"
134129
security create-keychain -p "${{ env.KEYCHAIN_PASSWORD }}" "${{ env.KEYCHAIN }}"
@@ -180,20 +175,22 @@ jobs:
180175
gon "${{ env.GON_CONFIG_PATH }}"
181176
182177
- name: Re-package binary
183-
id: re-package
184178
working-directory: ${{ env.DIST_DIR }}
185179
# Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
186180
run: |
187181
# GitHub's upload/download-artifact actions don't preserve file permissions,
188182
# so we need to add execution permission back until the action is made to do this.
189183
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
191187
192-
- name: Upload notarized artifact
188+
- name: Replace artifact with notarized build
193189
uses: actions/upload-artifact@v4
194190
with:
195191
if-no-files-found: error
196192
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
193+
overwrite: true
197194
path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}
198195

199196
create-release:
@@ -213,7 +210,7 @@ jobs:
213210
pattern: ${{ env.ARTIFACT_PREFIX }}*
214211

215212
- name: Create checksum file
216-
working-directory: ${{ env.DIST_DIR}}
213+
working-directory: ${{ env.DIST_DIR }}
217214
run: |
218215
TAG="${GITHUB_REF/refs\/tags\//}"
219216
sha256sum ${{ env.PROJECT_NAME }}_${TAG}* > ${TAG}-checksums.txt

0 commit comments

Comments
 (0)