Skip to content

Commit a77bc56

Browse files
committed
Upgrade actions/upload-artifact and actions/download-artifact to v4
The workflow previously uploaded multiple artifacts under the same 'name'. This is no more allowed on v4, so we have to upload each artifact under a unique name. When downloading we can merge multiple artifacts using the 'pattern' matching and the `merge-multiple: true` option.
1 parent 2057c0e commit a77bc56

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

workflow-templates/publish-go-nightly-task.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
run: task dist:${{ matrix.os }}
5555

5656
- name: Upload artifacts
57-
uses: actions/upload-artifact@v3
57+
uses: actions/upload-artifact@v4
5858
with:
5959
if-no-files-found: error
60-
name: ${{ env.ARTIFACT_NAME }}
60+
name: ${{ env.ARTIFACT_NAME }}-${{ matrix.os }}
6161
path: ${{ env.DIST_DIR }}
6262

6363
notarize-macos:
@@ -88,9 +88,10 @@ jobs:
8888
uses: actions/checkout@v4
8989

9090
- name: Download artifacts
91-
uses: actions/download-artifact@v3
91+
uses: actions/download-artifact@v4
9292
with:
93-
name: ${{ env.ARTIFACT_NAME }}
93+
pattern: ${{ env.ARTIFACT_NAME }}-*
94+
merge-multiple: true
9495
path: ${{ env.DIST_DIR }}
9596

9697
- name: Import Code-Signing Certificates
@@ -165,10 +166,10 @@ jobs:
165166
echo "PACKAGE_FILENAME=$PACKAGE_FILENAME" >> $GITHUB_ENV
166167
167168
- name: Upload artifact
168-
uses: actions/upload-artifact@v3
169+
uses: actions/upload-artifact@v4
169170
with:
170171
if-no-files-found: error
171-
name: ${{ env.ARTIFACT_NAME }}
172+
name: ${{ env.ARTIFACT_NAME }}-notarized-${{ matrix.artifact.name }}
172173
path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}
173174

174175
publish-nightly:
@@ -180,9 +181,10 @@ jobs:
180181

181182
steps:
182183
- name: Download artifact
183-
uses: actions/download-artifact@v3
184+
uses: actions/download-artifact@v4
184185
with:
185-
name: ${{ env.ARTIFACT_NAME }}
186+
pattern: ${{ env.ARTIFACT_NAME }}-*
187+
merge-multiple: true
186188
path: ${{ env.DIST_DIR }}
187189

188190
- name: Create checksum file

0 commit comments

Comments
 (0)