Skip to content

Commit 5444eb5

Browse files
authored
Merge pull request #171 from arduino/dependabot/github_actions/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2 parents 6ff43c4 + 3608ae2 commit 5444eb5

File tree

4 files changed

+62
-41
lines changed

4 files changed

+62
-41
lines changed

Diff for: .github/workflows/build.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
branches:
1212
- main
1313

14+
env:
15+
ARTIFACT_PREFIX: dist-
16+
1417
jobs:
1518

1619
build:
@@ -20,13 +23,16 @@ jobs:
2023
strategy:
2124
matrix:
2225
config:
23-
- os: ubuntu-latest
26+
- artifact-suffix: Linux_64bit
27+
os: ubuntu-latest
2428
ExecutableSuffix: ''
2529
Exports: ''
26-
- os: macos-latest
30+
- artifact-suffix: macOS_ARM64
31+
os: macos-latest
2732
ExecutableSuffix: ''
2833
Exports: 'CGO_ENABLED=1 MACOSX_DEPLOYMENT_TARGET=10.14 '
29-
- os: windows-2019
34+
- artifact-suffix: Windows_64bit
35+
os: windows-2019
3036
ExecutableSuffix: '.exe'
3137
Exports: ''
3238
runs-on: ${{ matrix.config.os }}
@@ -48,9 +54,9 @@ jobs:
4854
run: 7z a "${{ github.workspace }}/${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip" "${{ github.workspace }}/${{ env.BUILD_OUTPUT_DIRECTORY }}/${{ runner.OS }}_amd64/*"
4955

5056
- name: Upload Workflow Artifact [GitHub Actions]
51-
uses: actions/upload-artifact@v3
57+
uses: actions/upload-artifact@v4
5258
with:
53-
name: build-artifacts
59+
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.config.artifact-suffix }}
5460
# this makes the artifact a .zip of the .zip archive, which is currently necessary to preserve the executable file permissions
5561
# see: https://github.com/actions/upload-artifact/issues/38
5662
path: ${{ env.BUILD_OUTPUT_DIRECTORY }}/archive/${{ env.EXECUTABLE_NAME }}_${{ runner.OS }}_amd64.zip
@@ -61,9 +67,10 @@ jobs:
6167
runs-on: ubuntu-latest
6268
steps:
6369
- name: Download Workflow Artifact [GitHub Actions]
64-
uses: actions/download-artifact@v3
70+
uses: actions/download-artifact@v4
6571
with:
66-
name: build-artifacts
72+
pattern: ${{ env.ARTIFACT_PREFIX }}*
73+
merge-multiple: true
6774
path: build-artifacts
6875

6976
- name: Publish Nightly [S3]

Diff for: .github/workflows/check-go-dependencies-task.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
# Some might find it convenient to have CI generate the cache rather than setting up for it locally
109109
- name: Upload cache to workflow artifact
110110
if: failure() && steps.diff.outcome == 'failure'
111-
uses: actions/upload-artifact@v3
111+
uses: actions/upload-artifact@v4
112112
with:
113113
if-no-files-found: error
114114
include-hidden-files: true

Diff for: .github/workflows/release-go-task.yml

+37-24
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88
DIST_DIR: dist
99
# The project's folder on Arduino's download server for uploading builds
1010
AWS_PLUGIN_TARGET: /arduino-language-server/
11-
ARTIFACT_NAME: dist
11+
ARTIFACT_PREFIX: dist-
1212

1313
on:
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
@@ -40,7 +49,7 @@ jobs:
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: '^[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:
@@ -78,9 +87,11 @@ jobs:
7887
strategy:
7988
matrix:
8089
build:
81-
- folder-suffix: darwin_amd64
90+
- artifact-suffix: macOS_64bit
91+
folder-suffix: darwin_amd64
8292
package-suffix: "macOS_64bit.tar.gz"
83-
- folder-suffix: darwin_arm64
93+
- artifact-suffix: macOS_ARM64
94+
folder-suffix: darwin_arm64
8495
package-suffix: "macOS_ARM64.tar.gz"
8596

8697
steps:
@@ -95,9 +106,9 @@ jobs:
95106
uses: actions/checkout@v4
96107

97108
- name: Download artifacts
98-
uses: actions/download-artifact@v3
109+
uses: actions/download-artifact@v4
99110
with:
100-
name: ${{ env.ARTIFACT_NAME }}
111+
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
101112
path: ${{ env.DIST_DIR }}
102113

103114
- name: Import Code-Signing Certificates
@@ -168,11 +179,12 @@ jobs:
168179
-C "${{ env.BUILD_FOLDER }}/" "${{ env.PROJECT_NAME }}" \
169180
-C ../../ LICENSE.txt
170181
171-
- name: Upload artifact
172-
uses: actions/upload-artifact@v3
182+
- name: Replace artifact with notarized build
183+
uses: actions/upload-artifact@v4
173184
with:
174185
if-no-files-found: error
175-
name: ${{ env.ARTIFACT_NAME }}
186+
name: ${{ env.ARTIFACT_PREFIX }}${{ matrix.build.artifact-suffix }}
187+
overwrite: true
176188
path: ${{ env.DIST_DIR }}/${{ env.PACKAGE_FILENAME }}
177189

178190
create-release:
@@ -181,9 +193,10 @@ jobs:
181193

182194
steps:
183195
- name: Download artifact
184-
uses: actions/download-artifact@v3
196+
uses: actions/download-artifact@v4
185197
with:
186-
name: ${{ env.ARTIFACT_NAME }}
198+
pattern: ${{ env.ARTIFACT_PREFIX }}*
199+
merge-multiple: true
187200
path: ${{ env.DIST_DIR }}
188201

189202
- name: Create checksum file

Diff for: .github/workflows/sync-labels.yml

+10-9
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)