88 - ' **.md'
99
1010jobs :
11-
1211 build :
1312 name : Build
1413
@@ -21,13 +20,12 @@ jobs:
2120
2221 steps :
2322 - name : Checkout
24- uses : actions/checkout@v3
23+ uses : actions/checkout@v4
2524
26- # using node 16 since that is what the latest version of the runner ships with
27- - name : Setup Node 16
28- uses : actions/setup-node@v3
25+ - name : Setup Node 20
26+ uses : actions/setup-node@v4
2927 with :
30- node-version : 16 .x
28+ node-version : 20 .x
3129 cache : ' npm'
3230
3331 - name : npm install
@@ -40,41 +38,39 @@ jobs:
4038 run : npm run lint
4139
4240 - name : Format
43- run : npm run format-check
41+ run : npm run format-check
4442
45- # Test end-to-end by uploading two artifacts and then downloading them
46- # Once upload-artifact v2 is out of preview, switch over
4743 - name : Create artifacts
4844 run : |
4945 mkdir -p path/to/artifact-A
5046 mkdir -p path/to/artifact-B
5147 echo "Lorem ipsum dolor sit amet" > path/to/artifact-A/file-A.txt
5248 echo "Hello world from file B" > path/to/artifact-B/file-B.txt
53-
49+
5450 - name : Upload artifact A
55- uses : actions/upload-artifact@v1
51+ uses : actions/upload-artifact@v4-beta
5652 with :
57- name : ' Artifact-A'
53+ name : Artifact-A-${{ matrix.runs-on }}
5854 path : path/to/artifact-A
5955
6056 - name : Upload artifact B
61- uses : actions/upload-artifact@v1
57+ uses : actions/upload-artifact@v4-beta
6258 with :
63- name : ' Artifact-B'
59+ name : Artifact-B-${{ matrix.runs-on }}
6460 path : path/to/artifact-B
6561
6662 # Test downloading a single artifact
6763 - name : Download artifact A
6864 uses : ./
6965 with :
70- name : ' Artifact-A'
66+ name : Artifact-A-${{ matrix.runs-on }}
7167 path : some/new/path
7268
7369 # Test downloading an artifact using tilde expansion
7470 - name : Download artifact A
7571 uses : ./
7672 with :
77- name : ' Artifact-A'
73+ name : Artifact-A-${{ matrix.runs-on }}
7874 path : ~/some/path/with/a/tilde
7975
8076 - name : Verify successful download
9995
10096 - name : Verify successful download
10197 run : |
102- $fileA = "some/other/path/Artifact-A/file-A.txt"
103- $fileB = "some/other/path/Artifact-B/file-B.txt"
98+ $fileA = "some/other/path/Artifact-A-${{ matrix.runs-on }} /file-A.txt"
99+ $fileB = "some/other/path/Artifact-B-${{ matrix.runs-on }} /file-B.txt"
104100 if(!(Test-Path -path $fileA) -or !(Test-Path -path $fileB))
105101 {
106102 Write-Error "Expected files do not exist"
@@ -110,5 +106,3 @@ jobs:
110106 Write-Error "File contents of downloaded artifacts are incorrect"
111107 }
112108 shell : pwsh
113-
114-
0 commit comments