88 DIST_DIR : dist
99 # The project's folder on Arduino's download server for uploading builds
1010 AWS_PLUGIN_TARGET : /discovery/mdns-discovery/
11- ARTIFACT_NAME : dist
11+ ARTIFACT_PREFIX : dist-
1212
1313on :
1414 push :
@@ -21,16 +21,25 @@ jobs:
2121
2222 strategy :
2323 matrix :
24- task :
25- - Windows_32bit
26- - Windows_64bit
27- - Linux_32bit
28- - Linux_64bit
29- - Linux_ARMv6
30- - Linux_ARMv7
31- - Linux_ARM64
32- - macOS_64bit
33- - macOS_ARM64
24+ os :
25+ - task : Windows_32bit
26+ artifact-suffix : Windows_32bit
27+ - task : Windows_64bit
28+ artifact-suffix : Windows_64bit
29+ - task : Linux_32bit
30+ artifact-suffix : Linux_32bit
31+ - task : Linux_64bit
32+ artifact-suffix : Linux_64bit
33+ - task : Linux_ARMv6
34+ artifact-suffix : Linux_ARMv6
35+ - task : Linux_ARMv7
36+ artifact-suffix : Linux_ARMv7
37+ - task : Linux_ARM64
38+ artifact-suffix : Linux_ARM64
39+ - task : macOS_64bit
40+ artifact-suffix : macOS_64bit
41+ - task : macOS_ARM64
42+ artifact-suffix : macOS_ARM64
3443
3544 steps :
3645 - name : Checkout repository
4049
4150 - name : Create changelog
4251 # Avoid creating the same changelog for each os
43- if : matrix.task == 'Windows_32bit'
52+ if : matrix.os. task == 'Windows_32bit'
4453 uses : arduino/create-changelog@v1
4554 with :
4655 tag-regex : ' ^v?[0-9]+\.[0-9]+\.[0-9]+.*$'
@@ -55,13 +64,13 @@ jobs:
5564 version : 3.x
5665
5766 - name : Build
58- run : task dist:${{ matrix.task }}
67+ run : task dist:${{ matrix.os. task }}
5968
6069 - name : Upload artifacts
61- uses : actions/upload-artifact@v3
70+ uses : actions/upload-artifact@v4
6271 with :
6372 if-no-files-found : error
64- name : ${{ env.ARTIFACT_NAME }}
73+ name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.os.artifact-suffix }}
6574 path : ${{ env.DIST_DIR }}
6675
6776 notarize-macos :
7584 strategy :
7685 matrix :
7786 build :
78- - folder-suffix : darwin_amd64
87+ - artifact-suffix : macOS_64bit
88+ folder-suffix : darwin_amd64
7989 package-suffix : " macOS_64bit.tar.gz"
80- - folder-suffix : darwin_arm64
90+ - artifact-suffix : macOS_ARM64
91+ folder-suffix : darwin_arm64
8192 package-suffix : " macOS_ARM64.tar.gz"
8293
8394 steps :
92103 uses : actions/checkout@v4
93104
94105 - name : Download artifacts
95- uses : actions/download-artifact@v3
106+ uses : actions/download-artifact@v4
96107 with :
97- name : ${{ env.ARTIFACT_NAME }}
108+ name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
98109 path : ${{ env.DIST_DIR }}
99110
100111 - name : Import Code-Signing Certificates
@@ -164,11 +175,12 @@ jobs:
164175 chmod +x "${{ env.BUILD_FOLDER }}/${{ env.PROJECT_NAME }}"
165176 tar -czvf "${{ env.PACKAGE_FILENAME }}" "${{ env.BUILD_FOLDER }}"
166177
167- - name : Upload artifact
168- uses : actions/upload-artifact@v3
178+ - name : Replace artifact with notarized build
179+ uses : actions/upload-artifact@v4
169180 with :
170181 if-no-files-found : error
171- name : ${{ env.ARTIFACT_NAME }}
182+ name : ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
183+ overwrite : true
172184 path : ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}
173185
174186 create-release :
@@ -177,9 +189,10 @@ jobs:
177189
178190 steps :
179191 - name : Download artifact
180- uses : actions/download-artifact@v3
192+ uses : actions/download-artifact@v4
181193 with :
182- name : ${{ env.ARTIFACT_NAME }}
194+ pattern : ${{ env.ARTIFACT_PREFIX }}*
195+ merge-multiple : true
183196 path : ${{ env.DIST_DIR }}
184197
185198 - name : Create checksum file
0 commit comments