Compare commits

..
Author SHA1 Message Date
Thomas BoopandGitHub 5dc68c18e2 Update to node16
Node 12 has an end of life on April 30, 2022.

This PR updates the default runtime to [node16](https://github.blog/changelog/2021-12-10-github-actions-github-hosted-runners-now-run-node-js-16-by-default/), rather then node12. 

This is supported on all Actions Runners v2.285.0 or later.
2022-02-07 14:06:57 -05:00
5 changed files with 3543 additions and 8362 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
--- ---
name: "@actions/artifact" name: "@actions/artifact"
version: 1.1.0 version: 0.6.1
type: npm type: npm
summary: summary:
homepage: homepage:
+19 -19
View File
@@ -1,4 +1,4 @@
# Upload-Artifact v3 # Upload-Artifact v2
This uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete. This uploads artifacts from your workflow allowing you to share data between jobs and store data once a workflow is complete.
@@ -34,7 +34,7 @@ steps:
- run: echo hello > path/to/artifact/world.txt - run: echo hello > path/to/artifact/world.txt
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: path/to/artifact/world.txt path: path/to/artifact/world.txt
@@ -43,7 +43,7 @@ steps:
### Upload an Entire Directory ### Upload an Entire Directory
```yaml ```yaml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: path/to/artifact/ # or path/to/artifact path: path/to/artifact/ # or path/to/artifact
@@ -52,7 +52,7 @@ steps:
### Upload using a Wildcard Pattern ### Upload using a Wildcard Pattern
```yaml ```yaml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: path/**/[abc]rtifac?/* path: path/**/[abc]rtifac?/*
@@ -61,7 +61,7 @@ steps:
### Upload using Multiple Paths and Exclusions ### Upload using Multiple Paths and Exclusions
```yaml ```yaml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: | path: |
@@ -97,7 +97,7 @@ The [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/ar
If a path (or paths), result in no files being found for the artifact, the action will succeed but print out a warning. In certain scenarios it may be desirable to fail the action or suppress the warning. The `if-no-files-found` option allows you to customize the behavior of the action if no files are found: If a path (or paths), result in no files being found for the artifact, the action will succeed but print out a warning. In certain scenarios it may be desirable to fail the action or suppress the warning. The `if-no-files-found` option allows you to customize the behavior of the action if no files are found:
```yaml ```yaml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: path/to/artifact/ path: path/to/artifact/
@@ -109,7 +109,7 @@ If a path (or paths), result in no files being found for the artifact, the actio
To upload artifacts only when the previous step of a job failed, use [`if: failure()`](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-status-check-functions): To upload artifacts only when the previous step of a job failed, use [`if: failure()`](https://help.github.com/en/articles/contexts-and-expression-syntax-for-github-actions#job-status-check-functions):
```yaml ```yaml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
if: failure() if: failure()
with: with:
name: my-artifact name: my-artifact
@@ -121,7 +121,7 @@ To upload artifacts only when the previous step of a job failed, use [`if: failu
You can upload an artifact without specifying a name You can upload an artifact without specifying a name
```yaml ```yaml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
path: path/to/artifact/world.txt path: path/to/artifact/world.txt
``` ```
@@ -134,17 +134,17 @@ With the following example, the available artifact (named `artifact` by default
```yaml ```yaml
- run: echo hi > world.txt - run: echo hi > world.txt
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
path: world.txt path: world.txt
- run: echo howdy > extra-file.txt - run: echo howdy > extra-file.txt
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
path: extra-file.txt path: extra-file.txt
- run: echo hello > world.txt - run: echo hello > world.txt
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
path: world.txt path: world.txt
``` ```
@@ -159,7 +159,7 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
- name: Create a file - name: Create a file
run: echo ${{ matrix.node-version }} > my_file.txt run: echo ${{ matrix.node-version }} > my_file.txt
- name: Accidentally upload to the same artifact via multiple jobs - name: Accidentally upload to the same artifact via multiple jobs
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: ${{ github.workspace }} path: ${{ github.workspace }}
@@ -170,7 +170,7 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
In the above example, four jobs will upload four different files to the same artifact but there will only be one file available when `my-artifact` is downloaded. Each job overwrites what was previously uploaded. To ensure that jobs don't overwrite existing artifacts, use a different name per job: In the above example, four jobs will upload four different files to the same artifact but there will only be one file available when `my-artifact` is downloaded. Each job overwrites what was previously uploaded. To ensure that jobs don't overwrite existing artifacts, use a different name per job:
```yaml ```yaml
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v2
with: with:
name: my-artifact ${{ matrix.node-version }} name: my-artifact ${{ matrix.node-version }}
path: ${{ github.workspace }} path: ${{ github.workspace }}
@@ -184,9 +184,9 @@ You can use `~` in the path input as a substitute for `$HOME`. Basic tilde expan
- run: | - run: |
mkdir -p ~/new/artifact mkdir -p ~/new/artifact
echo hello > ~/new/artifact/world.txt echo hello > ~/new/artifact/world.txt
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: Artifacts-V3 name: Artifacts-V2
path: ~/new/**/* path: ~/new/**/*
``` ```
@@ -199,7 +199,7 @@ Environment variables along with context expressions can also be used for input.
- run: | - run: |
mkdir -p ${{ github.workspace }}/artifact mkdir -p ${{ github.workspace }}/artifact
echo hello > ${{ github.workspace }}/artifact/world.txt echo hello > ${{ github.workspace }}/artifact/world.txt
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: ${{ env.name }}-name name: ${{ env.name }}-name
path: ${{ github.workspace }}/artifact/**/* path: ${{ github.workspace }}/artifact/**/*
@@ -213,7 +213,7 @@ For environment variables created in other steps, make sure to use the `env` exp
mkdir testing mkdir testing
echo "This is a file to upload" > testing/file.txt echo "This is a file to upload" > testing/file.txt
echo "artifactPath=testing/file.txt" >> $GITHUB_ENV echo "artifactPath=testing/file.txt" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
with: with:
name: artifact name: artifact
path: ${{ env.artifactPath }} # this will resolve to testing/file.txt at runtime path: ${{ env.artifactPath }} # this will resolve to testing/file.txt at runtime
@@ -228,7 +228,7 @@ Artifacts are retained for 90 days by default. You can specify a shorter retenti
run: echo "I won't live long" > my_file.txt run: echo "I won't live long" > my_file.txt
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: my_file.txt path: my_file.txt
@@ -270,7 +270,7 @@ If file permissions and case sensitivity are required, you can `tar` all of your
run: tar -cvf my_files.tar /path/to/my/directory run: tar -cvf my_files.tar /path/to/my/directory
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: my_files.tar path: my_files.tar
+721 -1250
View File
File diff suppressed because it is too large Load Diff
+2800 -7090
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "upload-artifact", "name": "upload-artifact",
"version": "3.0.0", "version": "2.0.1",
"description": "Upload a build artifact that can be used by subsequent workflow steps", "description": "Upload a build artifact that can be used by subsequent workflow steps",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
@@ -29,7 +29,7 @@
}, },
"homepage": "https://github.com/actions/upload-artifact#readme", "homepage": "https://github.com/actions/upload-artifact#readme",
"dependencies": { "dependencies": {
"@actions/artifact": "^1.1.0", "@actions/artifact": "^0.6.1",
"@actions/core": "^1.2.6", "@actions/core": "^1.2.6",
"@actions/glob": "^0.1.0", "@actions/glob": "^0.1.0",
"@actions/io": "^1.0.2" "@actions/io": "^1.0.2"