mirror of
https://github.com/actions/upload-artifact.git
synced 2025-12-06 08:58:34 +08:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c24449f33c | ||
|
|
2339de448d | ||
|
|
672174a5ba | ||
|
|
9ee08a3b00 | ||
|
|
ff37344dc2 | ||
|
|
d99c5eca07 | ||
|
|
afc7e4a27d | ||
|
|
97a0fba137 |
39
.github/workflows/check-dist.yml
vendored
39
.github/workflows/check-dist.yml
vendored
@@ -10,11 +10,9 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -22,32 +20,33 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node 20
|
||||
uses: actions/setup-node@v4
|
||||
- name: Setup Node 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
node-version: 16.x
|
||||
cache: 'npm'
|
||||
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Rebuild the dist/ directory
|
||||
- name: Move the committed index.js file
|
||||
run: mv dist/index.js /tmp
|
||||
|
||||
- name: Rebuild with tsc
|
||||
run: npm run build
|
||||
|
||||
- name: Compare the expected and actual dist/ directories
|
||||
run: |
|
||||
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
|
||||
echo "Detected uncommitted changes after build. See status below:"
|
||||
git diff
|
||||
exit 1
|
||||
fi
|
||||
- name: Rebuild the index.js file
|
||||
run: npm run release
|
||||
|
||||
- name: Compare the expected and actual index.js files
|
||||
run: git diff --ignore-all-space dist/index.js /tmp/index.js
|
||||
id: diff
|
||||
|
||||
# If index.js was different than expected, upload the expected version as an artifact
|
||||
- uses: actions/upload-artifact@v4
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
name: index.js
|
||||
path: dist/index.js
|
||||
|
||||
2
.github/workflows/licensed.yml
vendored
2
.github/workflows/licensed.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
name: Check licenses
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v2
|
||||
- run: npm ci
|
||||
- name: Install licensed
|
||||
run: |
|
||||
|
||||
63
.github/workflows/test.yml
vendored
63
.github/workflows/test.yml
vendored
@@ -1,5 +1,4 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -11,6 +10,7 @@ on:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
||||
@@ -23,12 +23,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node 20
|
||||
uses: actions/setup-node@v4
|
||||
- name: Setup Node 16
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20.x
|
||||
node-version: 16.x
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
@@ -54,26 +54,33 @@ jobs:
|
||||
mkdir -p path/to/dir-3
|
||||
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
|
||||
echo "Hello world from file #2" > path/to/dir-2/file2.txt
|
||||
echo "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip" > path/to/dir-3/gzip.txt
|
||||
|
||||
# Upload a single file artifact
|
||||
- name: 'Upload artifact #1'
|
||||
uses: ./
|
||||
with:
|
||||
name: 'Artifact-A-${{ matrix.runs-on }}'
|
||||
name: 'Artifact-A'
|
||||
path: path/to/dir-1/file1.txt
|
||||
|
||||
# Upload using a wildcard pattern
|
||||
# Upload using a wildcard pattern, name should default to 'artifact' if not provided
|
||||
- name: 'Upload artifact #2'
|
||||
uses: ./
|
||||
with:
|
||||
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
|
||||
path: path/**/dir*/
|
||||
|
||||
# Upload a multi-path artifact
|
||||
# Upload a directory that contains a file that will be uploaded with GZip
|
||||
- name: 'Upload artifact #3'
|
||||
uses: ./
|
||||
with:
|
||||
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
|
||||
name: 'GZip-Artifact'
|
||||
path: path/to/dir-3/
|
||||
|
||||
# Upload a directory that contains a file that will be uploaded with GZip
|
||||
- name: 'Upload artifact #4'
|
||||
uses: ./
|
||||
with:
|
||||
name: 'Multi-Path-Artifact'
|
||||
path: |
|
||||
path/to/dir-1/*
|
||||
path/to/dir-[23]/*
|
||||
@@ -81,9 +88,9 @@ jobs:
|
||||
|
||||
# Download Artifact #1 and verify the correctness of the content
|
||||
- name: 'Download artifact #1'
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: 'Artifact-A-${{ matrix.runs-on }}'
|
||||
name: 'Artifact-A'
|
||||
path: some/new/path
|
||||
|
||||
- name: 'Verify Artifact #1'
|
||||
@@ -101,9 +108,9 @@ jobs:
|
||||
|
||||
# Download Artifact #2 and verify the correctness of the content
|
||||
- name: 'Download artifact #2'
|
||||
uses: actions/download-artifact@v4
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: 'Artifact-Wildcard-${{ matrix.runs-on }}'
|
||||
name: 'artifact'
|
||||
path: some/other/path
|
||||
|
||||
- name: 'Verify Artifact #2'
|
||||
@@ -120,11 +127,31 @@ jobs:
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
# Download Artifact #4 and verify the correctness of the content
|
||||
- name: 'Download artifact #4'
|
||||
uses: actions/download-artifact@v4
|
||||
# Download Artifact #3 and verify the correctness of the content
|
||||
- name: 'Download artifact #3'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: 'Multi-Path-Artifact-${{ matrix.runs-on }}'
|
||||
name: 'GZip-Artifact'
|
||||
path: gzip/artifact/path
|
||||
|
||||
# Because a directory was used as input during the upload the parent directories, path/to/dir-3/, should not be included in the uploaded artifact
|
||||
- name: 'Verify Artifact #3'
|
||||
run: |
|
||||
$gzipFile = "gzip/artifact/path/gzip.txt"
|
||||
if(!(Test-Path -path $gzipFile))
|
||||
{
|
||||
Write-Error "Expected file do not exist"
|
||||
}
|
||||
if(!((Get-Content $gzipFile) -ceq "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip"))
|
||||
{
|
||||
Write-Error "File contents of downloaded artifact is incorrect"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
- name: 'Download artifact #4'
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: 'Multi-Path-Artifact'
|
||||
path: multi/artifact
|
||||
|
||||
- name: 'Verify Artifact #4'
|
||||
|
||||
BIN
.licenses/npm/@actions/artifact.dep.yml
generated
BIN
.licenses/npm/@actions/artifact.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/github.dep.yml
generated
BIN
.licenses/npm/@actions/github.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@actions/http-client.dep.yml
generated
BIN
.licenses/npm/@actions/http-client.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/abort-controller.dep.yml
generated
BIN
.licenses/npm/@azure/abort-controller.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-auth.dep.yml
generated
BIN
.licenses/npm/@azure/core-auth.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-http.dep.yml
generated
BIN
.licenses/npm/@azure/core-http.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-lro.dep.yml
generated
BIN
.licenses/npm/@azure/core-lro.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-paging.dep.yml
generated
BIN
.licenses/npm/@azure/core-paging.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/core-tracing.dep.yml
generated
BIN
.licenses/npm/@azure/core-tracing.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/logger.dep.yml
generated
BIN
.licenses/npm/@azure/logger.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@azure/storage-blob.dep.yml
generated
BIN
.licenses/npm/@azure/storage-blob.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@fastify/busboy.dep.yml
generated
BIN
.licenses/npm/@fastify/busboy.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/auth-token.dep.yml
generated
BIN
.licenses/npm/@octokit/auth-token.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/core.dep.yml
generated
BIN
.licenses/npm/@octokit/core.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/endpoint.dep.yml
generated
BIN
.licenses/npm/@octokit/endpoint.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/graphql.dep.yml
generated
BIN
.licenses/npm/@octokit/graphql.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml
generated
BIN
.licenses/npm/@octokit/openapi-types-12.11.0.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/openapi-types-19.1.0.dep.yml
generated
BIN
.licenses/npm/@octokit/openapi-types-19.1.0.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/plugin-paginate-rest.dep.yml
generated
BIN
.licenses/npm/@octokit/plugin-paginate-rest.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/plugin-request-log.dep.yml
generated
BIN
.licenses/npm/@octokit/plugin-request-log.dep.yml
generated
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
BIN
.licenses/npm/@octokit/plugin-retry.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/request-error-2.1.0.dep.yml
generated
BIN
.licenses/npm/@octokit/request-error-2.1.0.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/request-error-5.0.1.dep.yml
generated
BIN
.licenses/npm/@octokit/request-error-5.0.1.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/request.dep.yml
generated
BIN
.licenses/npm/@octokit/request.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/types-12.4.0.dep.yml
generated
BIN
.licenses/npm/@octokit/types-12.4.0.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@octokit/types-6.41.0.dep.yml
generated
BIN
.licenses/npm/@octokit/types-6.41.0.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@opentelemetry/api.dep.yml
generated
BIN
.licenses/npm/@opentelemetry/api.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/plugin-framework.dep.yml
generated
BIN
.licenses/npm/@protobuf-ts/plugin-framework.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/plugin.dep.yml
generated
BIN
.licenses/npm/@protobuf-ts/plugin.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/protoc.dep.yml
generated
BIN
.licenses/npm/@protobuf-ts/protoc.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml
generated
BIN
.licenses/npm/@protobuf-ts/runtime-rpc.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@protobuf-ts/runtime.dep.yml
generated
BIN
.licenses/npm/@protobuf-ts/runtime.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@types/node-fetch.dep.yml
generated
BIN
.licenses/npm/@types/node-fetch.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@types/node.dep.yml
generated
BIN
.licenses/npm/@types/node.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/@types/tunnel.dep.yml
generated
BIN
.licenses/npm/@types/tunnel.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/archiver-utils-2.1.0.dep.yml
generated
BIN
.licenses/npm/archiver-utils-2.1.0.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/archiver-utils-3.0.4.dep.yml
generated
BIN
.licenses/npm/archiver-utils-3.0.4.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/archiver.dep.yml
generated
BIN
.licenses/npm/archiver.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/async.dep.yml
generated
BIN
.licenses/npm/async.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/asynckit.dep.yml
generated
BIN
.licenses/npm/asynckit.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/base64-js.dep.yml
generated
BIN
.licenses/npm/base64-js.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/before-after-hook.dep.yml
generated
BIN
.licenses/npm/before-after-hook.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/binary.dep.yml
generated
BIN
.licenses/npm/binary.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/bl.dep.yml
generated
BIN
.licenses/npm/bl.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/bottleneck.dep.yml
generated
BIN
.licenses/npm/bottleneck.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/brace-expansion-2.0.1.dep.yml
generated
BIN
.licenses/npm/brace-expansion-2.0.1.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/buffer-crc32.dep.yml
generated
BIN
.licenses/npm/buffer-crc32.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/buffer.dep.yml
generated
BIN
.licenses/npm/buffer.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/buffers.dep.yml
generated
BIN
.licenses/npm/buffers.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/camel-case.dep.yml
generated
BIN
.licenses/npm/camel-case.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/chainsaw.dep.yml
generated
BIN
.licenses/npm/chainsaw.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/combined-stream.dep.yml
generated
BIN
.licenses/npm/combined-stream.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/commander.dep.yml
generated
BIN
.licenses/npm/commander.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/compress-commons.dep.yml
generated
BIN
.licenses/npm/compress-commons.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/core-util-is.dep.yml
generated
BIN
.licenses/npm/core-util-is.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/crc-32.dep.yml
generated
BIN
.licenses/npm/crc-32.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/crc32-stream.dep.yml
generated
BIN
.licenses/npm/crc32-stream.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/crypto.dep.yml
generated
BIN
.licenses/npm/crypto.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/delayed-stream.dep.yml
generated
BIN
.licenses/npm/delayed-stream.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/deprecation.dep.yml
generated
BIN
.licenses/npm/deprecation.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/dot-object.dep.yml
generated
BIN
.licenses/npm/dot-object.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/end-of-stream.dep.yml
generated
BIN
.licenses/npm/end-of-stream.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/events.dep.yml
generated
BIN
.licenses/npm/events.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/form-data.dep.yml
generated
BIN
.licenses/npm/form-data.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/fs-constants.dep.yml
generated
BIN
.licenses/npm/fs-constants.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/graceful-fs.dep.yml
generated
BIN
.licenses/npm/graceful-fs.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/ieee754.dep.yml
generated
BIN
.licenses/npm/ieee754.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/is-plain-object.dep.yml
generated
BIN
.licenses/npm/is-plain-object.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/isarray.dep.yml
generated
BIN
.licenses/npm/isarray.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/jwt-decode.dep.yml
generated
BIN
.licenses/npm/jwt-decode.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lazystream.dep.yml
generated
BIN
.licenses/npm/lazystream.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lodash.defaults.dep.yml
generated
BIN
.licenses/npm/lodash.defaults.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lodash.dep.yml
generated
BIN
.licenses/npm/lodash.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lodash.difference.dep.yml
generated
BIN
.licenses/npm/lodash.difference.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lodash.flatten.dep.yml
generated
BIN
.licenses/npm/lodash.flatten.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lodash.isplainobject.dep.yml
generated
BIN
.licenses/npm/lodash.isplainobject.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lodash.union.dep.yml
generated
BIN
.licenses/npm/lodash.union.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/lower-case.dep.yml
generated
BIN
.licenses/npm/lower-case.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/mime-db.dep.yml
generated
BIN
.licenses/npm/mime-db.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/mime-types.dep.yml
generated
BIN
.licenses/npm/mime-types.dep.yml
generated
Binary file not shown.
Binary file not shown.
BIN
.licenses/npm/minimist.dep.yml
generated
BIN
.licenses/npm/minimist.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/mkdirp.dep.yml
generated
BIN
.licenses/npm/mkdirp.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/no-case.dep.yml
generated
BIN
.licenses/npm/no-case.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/node-fetch.dep.yml
generated
BIN
.licenses/npm/node-fetch.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/normalize-path.dep.yml
generated
BIN
.licenses/npm/normalize-path.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/pascal-case.dep.yml
generated
BIN
.licenses/npm/pascal-case.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/path-to-regexp.dep.yml
generated
BIN
.licenses/npm/path-to-regexp.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/prettier.dep.yml
generated
BIN
.licenses/npm/prettier.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/process-nextick-args.dep.yml
generated
BIN
.licenses/npm/process-nextick-args.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/process.dep.yml
generated
BIN
.licenses/npm/process.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/readable-stream-2.3.8.dep.yml
generated
BIN
.licenses/npm/readable-stream-2.3.8.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/readable-stream-3.6.2.dep.yml
generated
BIN
.licenses/npm/readable-stream-3.6.2.dep.yml
generated
Binary file not shown.
BIN
.licenses/npm/readdir-glob.dep.yml
generated
BIN
.licenses/npm/readdir-glob.dep.yml
generated
Binary file not shown.
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