1
0
mirror of https://github.com/actions/download-artifact.git synced 2025-12-06 09:47:49 +01:00

Compare commits

..

11 Commits

Author SHA1 Message Date
Jonathan Tamsut
fb598a63ae Merge pull request #136 from actions/jtamsut/update-lockfile-version
Update `lockfileVersion` in `package-lock.json`
2022-03-02 10:35:41 -08:00
Jonathan Tamsut
a4a09c5d7e regenerate index.js 2022-03-01 14:43:36 -08:00
Jonathan Tamsut
9acf51df79 regenerate package lock 2022-03-01 14:31:56 -08:00
Jonathan Tamsut
8821072325 upgrade artifact version 2022-03-01 14:30:51 -08:00
Jonathan Tamsut
b8bbd3b64f regenerate lockfile 2022-03-01 13:38:43 -08:00
Jonathan Tamsut
6ee3d963e5 revert artifact version 2022-03-01 13:37:07 -08:00
Jonathan Tamsut
d4793f4e27 update docs for v3 2022-03-01 13:27:20 -08:00
Jonathan Tamsut
2d338d2145 upgrade package to v3 2022-03-01 13:18:36 -08:00
Jonathan Tamsut
360d0830b5 update dependency on artifact lib 2022-03-01 13:14:55 -08:00
Jonathan Tamsut
d9b73cccac update lock file 2022-03-01 13:14:35 -08:00
Thomas Boop
a327a9c763 Update default runtime to node16 (#134)
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 21:18:27 +01:00
6 changed files with 3343 additions and 2139 deletions

View File

@@ -1,6 +1,6 @@
---
name: "@actions/artifact"
version: 0.6.0
version: 1.0.0
type: npm
summary: Actions artifact lib
homepage: https://github.com/actions/toolkit/tree/main/packages/artifact

View File

@@ -1,4 +1,4 @@
# Download-Artifact v2
# Download-Artifact v3
This downloads artifacts from your build
@@ -10,7 +10,7 @@ See also [upload-artifact](https://github.com/actions/upload-artifact).
- Output parameter for the download path
- Port entire action to typescript from a runner plugin so it is easier to collaborate and accept contributions
Refer [here](https://github.com/actions/download-artifact/tree/v1) for the previous version
Refer [here](https://github.com/actions/download-artifact/tree/v2) for the previous version
# Usage
@@ -23,7 +23,7 @@ Basic (download to the current working directory):
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: my-artifact
@@ -36,7 +36,7 @@ Download to a specific directory:
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: my-artifact
path: path/to/artifact
@@ -48,13 +48,13 @@ steps:
Basic tilde expansion is supported for the `path` input:
```yaml
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: my-artifact
path: ~/download/path
```
## Compatibility between `v1` and `v2`
## Compatibility between `v1` and `v2`/`v3`
When using `download-artifact@v1`, a directory denoted by the name of the artifact would be created if the `path` input was not provided. All of the contents would be downloaded to this directory.
```
@@ -63,13 +63,13 @@ When using `download-artifact@v1`, a directory denoted by the name of the artifa
... contents of my-artifact
```
With `v2`, when an artifact is specified by the `name` input, there is no longer an extra directory that is created if the `path` input is not provided. All the contents are downloaded to the current working directory.
With `v2` and `v3`, when an artifact is specified by the `name` input, there is no longer an extra directory that is created if the `path` input is not provided. All the contents are downloaded to the current working directory.
```
current/working/directory/
... contents of my-artifact
```
To maintain the same behavior for `v2`, you can set the `path` to the name of the artifact so an extra directory gets created.
To maintain the same behavior for `v2` and `v3`, you can set the `path` to the name of the artifact so an extra directory gets created.
```
- uses: actions/download-artifact@v2
with:
@@ -95,7 +95,7 @@ Download all artifacts to a specific directory
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
path: path/to/artifacts
@@ -109,7 +109,7 @@ Download all artifacts to the current working directory
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
@@ -123,7 +123,7 @@ The `download-path` step output contains information regarding where the artifac
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
id: download
with:
name: 'my-artifact'

View File

@@ -9,5 +9,5 @@ inputs:
description: 'Destination path'
required: false
runs:
using: 'node12'
main: 'dist/index.js'
using: 'node16'
main: 'dist/index.js'

2252
dist/index.js vendored

File diff suppressed because it is too large Load Diff

3196
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "download-artifact",
"version": "2.0.0",
"version": "3.0.0",
"description": "Download a build artifact that was previously uploaded in the workflow by the upload-artifact action",
"main": "dist/index.js",
"scripts": {
@@ -28,8 +28,8 @@
},
"homepage": "https://github.com/actions/download-artifact#readme",
"dependencies": {
"@actions/artifact": "^0.6.0",
"@actions/core": "^1.10.0"
"@actions/artifact": "^1.0.0",
"@actions/core": "^1.2.6"
},
"devDependencies": {
"@types/node": "^12.12.6",