Skip to content

Commit b5ff844

Browse files
authored
Merge pull request #245 from actions/robherley/v4-documentation
Update documentation for v4
2 parents 7eafc8b + f07a0f7 commit b5ff844

8 files changed

Lines changed: 89605 additions & 68772 deletions

File tree

.github/workflows/check-dist.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ jobs:
2222
runs-on: ubuntu-latest
2323

2424
steps:
25-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
2626

27-
- name: Setup Node 16
28-
uses: actions/setup-node@v3
27+
- name: Setup Node 20
28+
uses: actions/setup-node@v4
2929
with:
30-
node-version: 16.x
30+
node-version: 20.x
3131
cache: 'npm'
3232

3333
- name: Install dependencies
@@ -46,7 +46,7 @@ jobs:
4646
id: diff
4747

4848
# If index.js was different than expected, upload the expected version as an artifact
49-
- uses: actions/upload-artifact@v3
49+
- uses: actions/upload-artifact@v4-beta
5050
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
5151
with:
5252
name: dist

.github/workflows/licensed.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
name: Check licenses
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- run: npm ci
1818
- name: Install licensed
1919
run: |

.github/workflows/test.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
- '**.md'
99

1010
jobs:
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
@@ -99,8 +95,8 @@ jobs:
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

Comments
 (0)