Skip to content

Commit 3b79267

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 b3be416 commit 3b79267

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

workflow-templates/release-go-task.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ jobs:
6161
run: task dist:${{ matrix.os }}
6262

6363
- name: Upload artifacts
64-
uses: actions/upload-artifact@v3
64+
uses: actions/upload-artifact@v4
6565
with:
6666
if-no-files-found: error
67-
name: ${{ env.ARTIFACT_NAME }}
67+
name: ${{ env.ARTIFACT_NAME }}-${{ matrix.os }}
6868
path: ${{ env.DIST_DIR }}
6969

7070
notarize-macos:
@@ -93,9 +93,10 @@ jobs:
9393
uses: actions/checkout@v4
9494

9595
- name: Download artifacts
96-
uses: actions/download-artifact@v3
96+
uses: actions/download-artifact@v4
9797
with:
98-
name: ${{ env.ARTIFACT_NAME }}
98+
pattern: ${{ env.ARTIFACT_NAME }}-*
99+
merge-multiple: true
99100
path: ${{ env.DIST_DIR }}
100101

101102
- name: Import Code-Signing Certificates
@@ -170,10 +171,10 @@ jobs:
170171
echo "PACKAGE_FILENAME=$PACKAGE_FILENAME" >> $GITHUB_ENV
171172
172173
- name: Upload artifact
173-
uses: actions/upload-artifact@v3
174+
uses: actions/upload-artifact@v4
174175
with:
175176
if-no-files-found: error
176-
name: ${{ env.ARTIFACT_NAME }}
177+
name: ${{ env.ARTIFACT_NAME }}-notarized-${{ matrix.artifact.name }}
177178
path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}
178179

179180
create-release:
@@ -186,9 +187,10 @@ jobs:
186187

187188
steps:
188189
- name: Download artifact
189-
uses: actions/download-artifact@v3
190+
uses: actions/download-artifact@v4
190191
with:
191-
name: ${{ env.ARTIFACT_NAME }}
192+
pattern: ${{ env.ARTIFACT_NAME }}-*
193+
merge-multiple: true
192194
path: ${{ env.DIST_DIR }}
193195

194196
- name: Create checksum file

0 commit comments

Comments
 (0)