Skip to content

Commit c130eaa

Browse files
committed
Move nightly build checksum generation to dedicated job
The "Publish Nightly Build" GitHub Actions workflow calculates checksums of the generated builds and writes them to a file. This file may be used to validate downloads of the builds. In addition to uploading the builds to Arduino's downloads server, the workflow also uploads them to GitHub Actions workflow artifacts. These artifacts may serve as an alternative source of the nightly builds (similar to the tester builds). Previously the checksum generation was performed in the workflow's "publish-nightly" job, which is used to upload the builds to Arduino's downloads server. In addition to being outside the stated scope of that job, this also meant that the checksum file was only available from Arduino's downloads server, and not from the workflow artifacts. Moving the checksum generation code to a dedicated job limits the operations in the important "publish-nightly" job exclusively to its stated scope. This also results in the checksum file being available as a workflow artifact.
1 parent 4532c38 commit c130eaa

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

.github/workflows/publish-go-nightly-task.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,13 +219,11 @@ jobs:
219219
overwrite: true
220220
path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}
221221

222-
publish-nightly:
223-
runs-on: ubuntu-latest
224-
environment: production
222+
checksums:
225223
needs: notarize-macos
224+
runs-on: ubuntu-latest
226225
permissions:
227-
contents: write
228-
id-token: write # This is required for requesting the JWT
226+
contents: read
229227

230228
steps:
231229
- name: Download artifact
@@ -241,6 +239,28 @@ jobs:
241239
TAG="nightly-$(date -u +"%Y%m%d")"
242240
sha256sum ${{ env.PROJECT_NAME }}_${TAG}* >${TAG}-checksums.txt
243241
242+
- name: Upload checksum artifact
243+
uses: actions/upload-artifact@v5
244+
with:
245+
path: ./*checksums.txt
246+
name: ${{ env.ARTIFACT_PREFIX }}checksums
247+
248+
publish-nightly:
249+
runs-on: ubuntu-latest
250+
environment: production
251+
needs: checksums
252+
permissions:
253+
contents: write
254+
id-token: write # This is required for requesting the JWT
255+
256+
steps:
257+
- name: Download artifact
258+
uses: actions/download-artifact@v6
259+
with:
260+
pattern: ${{ env.ARTIFACT_PREFIX }}*
261+
merge-multiple: true
262+
path: ${{ env.DIST_DIR }}
263+
244264
- name: configure aws credentials
245265
uses: aws-actions/configure-aws-credentials@v5
246266
with:

0 commit comments

Comments
 (0)