Skip to content

Commit 0b9ee3f

Browse files
authored
Merge pull request #38 from arduino/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2 parents 3c38ec8 + 1b806ac commit 0b9ee3f

File tree

2 files changed

+38
-28
lines changed

2 files changed

+38
-28
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44
# The name of the project
55
PROJECT_NAME: imgtool
66
DIST_DIR: dist
7-
ARTIFACT_NAME: dist
7+
ARTIFACT_PREFIX: dist-
88
# The project's folder on Arduino's download server for uploading builds
99
AWS_PLUGIN_TARGET: /tools/
1010
# See: https://github.com/actions/setup-python/tree/main#available-versions-of-python
@@ -39,7 +39,7 @@ jobs:
3939
defaults:
4040
run:
4141
shell: bash
42-
42+
4343
runs-on: ${{ matrix.os }}
4444

4545
steps:
@@ -54,7 +54,7 @@ jobs:
5454
uses: actions/checkout@v4
5555
with:
5656
path: ${{ env.IMGTOOL_PACKING_PATH }}
57-
57+
5858
- name: Set the version
5959
working-directory: ${{ env.IMGTOOL_PACKING_PATH }}/patches/
6060
run: perl -pi -e "s/ARDUINO_VERSION_PLACEHOLDER/${GITHUB_REF/refs\/tags\//}/g" 0008-Imgtool-Append-arduino-to-version-string.patch
@@ -97,7 +97,7 @@ jobs:
9797
mv -v ./${{ env.PROJECT_NAME }}.exe ${{ env.PROJECT_NAME }}_${{ matrix.package_platform }}
9898
mv -v "${{ env.IMGTOOL_PACKING_PATH }}/LICENSE.txt" ${{ env.PROJECT_NAME }}_${{ matrix.package_platform }}
9999
7z a ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.zip ${{ env.PROJECT_NAME }}_${{ matrix.package_platform }}
100-
100+
101101
- name: Package
102102
if: runner.os != 'Windows'
103103
working-directory: ${{ env.MCUBOOT_PATH }}/scripts/${{ env.DIST_DIR }}
@@ -109,10 +109,10 @@ jobs:
109109
${{ matrix.archive_util }} -cz ${{ env.PROJECT_NAME }}_${{ matrix.package_platform }} -f ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.tar.gz
110110
111111
- name: Upload artifacts
112-
uses: actions/upload-artifact@v3
112+
uses: actions/upload-artifact@v4
113113
with:
114114
if-no-files-found: error
115-
name: ${{ env.ARTIFACT_NAME }}
115+
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.package_platform }}
116116
path: ${{ env.MCUBOOT_PATH }}/scripts/dist/${{ env.PROJECT_NAME }}_*
117117

118118
build-crosscompile:
@@ -155,7 +155,7 @@ jobs:
155155
with:
156156
image: tonistiigi/binfmt:latest
157157
platforms: all
158-
158+
159159
- name: Copy build script
160160
working-directory: ${{ env.IMGTOOL_PACKING_PATH }}
161161
run: cp build.sh ${{ env.MCUBOOT_PATH }}/scripts/imgtool/
@@ -180,26 +180,34 @@ jobs:
180180
sudo tar -cz ${{ env.PROJECT_NAME }}_${{ matrix.package_platform }} -f ${{ env.PROJECT_NAME }}_${GITHUB_REF/refs\/tags\//}_${{ matrix.package_platform }}.tar.gz #dist dir is created in the container with different user/grp
181181
182182
- name: Upload artifacts
183-
uses: actions/upload-artifact@v3
183+
uses: actions/upload-artifact@v4
184184
with:
185185
if-no-files-found: error
186-
name: ${{ env.ARTIFACT_NAME }}
186+
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.package_platform }}
187187
path: ${{ env.MCUBOOT_PATH }}/scripts/dist/${{ env.PROJECT_NAME }}_*
188188

189189
notarize-macos:
190190
runs-on: macos-latest
191191
needs: build
192192

193+
env:
194+
ARTIFACT_SUFFIX: macOS_64bit
195+
193196
steps:
194197
- name: Checkout repository
195198
uses: actions/checkout@v4
196199

197-
- name: Download artifacts
198-
uses: actions/download-artifact@v3
200+
- name: Download non-notarized artifact
201+
uses: actions/download-artifact@v4
199202
with:
200-
name: ${{ env.ARTIFACT_NAME }}
203+
name: ${{ env.ARTIFACT_PREFIX }}${{ env.ARTIFACT_SUFFIX }}
201204
path: ${{ env.DIST_DIR }}
202205

206+
- name: Remove non-notarized artifact
207+
uses: geekyeggo/delete-artifact@v5
208+
with:
209+
name: ${{ env.ARTIFACT_PREFIX }}${{ env.ARTIFACT_SUFFIX }}
210+
203211
- name: Import Code-Signing Certificates
204212
env:
205213
KEYCHAIN: "sign.keychain"
@@ -248,13 +256,13 @@ jobs:
248256
PACKAGE_FILENAME="${{ env.PROJECT_NAME }}_${TAG}_macOS_64bit.tar.gz"
249257
tar -czvf "${PACKAGE_FILENAME}" "${{ env.PROJECT_NAME }}_macOS_64bit"
250258
251-
- name: Upload artifacts
252-
uses: actions/upload-artifact@v3
259+
- name: Upload notarized artifact
260+
uses: actions/upload-artifact@v4
253261
with:
254262
if-no-files-found: error
255-
name: ${{ env.ARTIFACT_NAME }}
263+
name: ${{ env.ARTIFACT_PREFIX }}${{ env.ARTIFACT_SUFFIX }}
256264
path: ${{ env.DIST_DIR }}
257-
265+
258266
create-release:
259267
runs-on: ubuntu-latest
260268
needs: [build, build-crosscompile, notarize-macos]
@@ -264,10 +272,11 @@ jobs:
264272
uses: actions/checkout@v4
265273

266274
- name: Download artifact
267-
uses: actions/download-artifact@v3
275+
uses: actions/download-artifact@v4
268276
with:
269-
name: ${{ env.ARTIFACT_NAME }}
277+
merge-multiple: true
270278
path: ${{ env.DIST_DIR }}
279+
pattern: ${{ env.ARTIFACT_PREFIX }}*
271280

272281
- name: Identify Prerelease
273282
# This is a workaround while waiting for create-release action
@@ -303,7 +312,7 @@ jobs:
303312
echo ================== CUT ME HERE =====================
304313
echo "${package_index}"
305314
echo "${package_index}" > dist/package_index_draft.json
306-
315+
307316
- name: Create Github Release and upload artifacts
308317
uses: ncipollo/release-action@v1
309318
with:

.github/workflows/sync-labels.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919

2020
env:
2121
CONFIGURATIONS_FOLDER: .github/label-configuration-files
22-
CONFIGURATIONS_ARTIFACT: label-configuration-files
22+
CONFIGURATIONS_ARTIFACT_PREFIX: label-configuration-file-
2323

2424
jobs:
2525
check:
@@ -71,13 +71,13 @@ jobs:
7171
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
7272

7373
- name: Pass configuration files to next job via workflow artifact
74-
uses: actions/upload-artifact@v3
74+
uses: actions/upload-artifact@v4
7575
with:
7676
path: |
7777
*.yaml
7878
*.yml
7979
if-no-files-found: error
80-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
80+
name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}${{ matrix.filename }}
8181

8282
sync:
8383
needs: download
@@ -108,16 +108,17 @@ jobs:
108108
- name: Checkout repository
109109
uses: actions/checkout@v4
110110

111-
- name: Download configuration files artifact
112-
uses: actions/download-artifact@v3
111+
- name: Download configuration file artifacts
112+
uses: actions/download-artifact@v4
113113
with:
114-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
114+
merge-multiple: true
115+
pattern: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}*
115116
path: ${{ env.CONFIGURATIONS_FOLDER }}
116117

117-
- name: Remove unneeded artifact
118-
uses: geekyeggo/delete-artifact@v2
118+
- name: Remove unneeded artifacts
119+
uses: geekyeggo/delete-artifact@v5
119120
with:
120-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
121+
name: ${{ env.CONFIGURATIONS_ARTIFACT_PREFIX }}*
121122

122123
- name: Merge label configuration files
123124
run: |

0 commit comments

Comments
 (0)