mirror of
https://github.com/actions/download-artifact.git
synced 2026-09-21 11:11:28 +00:00
@@ -22,12 +22,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node 16
|
- name: Setup Node 20
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 20.x
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
id: diff
|
id: diff
|
||||||
|
|
||||||
# If index.js was different than expected, upload the expected version as an artifact
|
# If index.js was different than expected, upload the expected version as an artifact
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4-beta
|
||||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Check licenses
|
name: Check licenses
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- name: Install licensed
|
- name: Install licensed
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+12
-18
@@ -8,7 +8,6 @@ on:
|
|||||||
- '**.md'
|
- '**.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
@@ -21,13 +20,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# using node 16 since that is what the latest version of the runner ships with
|
- name: Setup Node 20
|
||||||
- name: Setup Node 16
|
uses: actions/setup-node@v4
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
with:
|
||||||
node-version: 16.x
|
node-version: 20.x
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
|
||||||
- name: npm install
|
- name: npm install
|
||||||
@@ -42,8 +40,6 @@ jobs:
|
|||||||
- name: Format
|
- name: Format
|
||||||
run: npm run format-check
|
run: npm run format-check
|
||||||
|
|
||||||
# Test end-to-end by uploading two artifacts and then downloading them
|
|
||||||
# Once upload-artifact v2 is out of preview, switch over
|
|
||||||
- name: Create artifacts
|
- name: Create artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir -p path/to/artifact-A
|
mkdir -p path/to/artifact-A
|
||||||
@@ -52,29 +48,29 @@ jobs:
|
|||||||
echo "Hello world from file B" > path/to/artifact-B/file-B.txt
|
echo "Hello world from file B" > path/to/artifact-B/file-B.txt
|
||||||
|
|
||||||
- name: Upload artifact A
|
- name: Upload artifact A
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v4-beta
|
||||||
with:
|
with:
|
||||||
name: 'Artifact-A'
|
name: Artifact-A-${{ matrix.runs-on }}
|
||||||
path: path/to/artifact-A
|
path: path/to/artifact-A
|
||||||
|
|
||||||
- name: Upload artifact B
|
- name: Upload artifact B
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v4-beta
|
||||||
with:
|
with:
|
||||||
name: 'Artifact-B'
|
name: Artifact-B-${{ matrix.runs-on }}
|
||||||
path: path/to/artifact-B
|
path: path/to/artifact-B
|
||||||
|
|
||||||
# Test downloading a single artifact
|
# Test downloading a single artifact
|
||||||
- name: Download artifact A
|
- name: Download artifact A
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
name: 'Artifact-A'
|
name: Artifact-A-${{ matrix.runs-on }}
|
||||||
path: some/new/path
|
path: some/new/path
|
||||||
|
|
||||||
# Test downloading an artifact using tilde expansion
|
# Test downloading an artifact using tilde expansion
|
||||||
- name: Download artifact A
|
- name: Download artifact A
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
name: 'Artifact-A'
|
name: Artifact-A-${{ matrix.runs-on }}
|
||||||
path: ~/some/path/with/a/tilde
|
path: ~/some/path/with/a/tilde
|
||||||
|
|
||||||
- name: Verify successful download
|
- name: Verify successful download
|
||||||
@@ -99,8 +95,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Verify successful download
|
- name: Verify successful download
|
||||||
run: |
|
run: |
|
||||||
$fileA = "some/other/path/Artifact-A/file-A.txt"
|
$fileA = "some/other/path/Artifact-A-${{ matrix.runs-on }}/file-A.txt"
|
||||||
$fileB = "some/other/path/Artifact-B/file-B.txt"
|
$fileB = "some/other/path/Artifact-B-${{ matrix.runs-on }}/file-B.txt"
|
||||||
if(!(Test-Path -path $fileA) -or !(Test-Path -path $fileB))
|
if(!(Test-Path -path $fileA) -or !(Test-Path -path $fileB))
|
||||||
{
|
{
|
||||||
Write-Error "Expected files do not exist"
|
Write-Error "Expected files do not exist"
|
||||||
@@ -110,5 +106,3 @@ jobs:
|
|||||||
Write-Error "File contents of downloaded artifacts are incorrect"
|
Write-Error "File contents of downloaded artifacts are incorrect"
|
||||||
}
|
}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
|
|
||||||
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
BIN
Binary file not shown.
Generated
BIN
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user