Update Readme

v2-preview
Konrad Pabjan 2020-04-28 12:58:56 +02:00
parent 32e7d7dd2b
commit bb55845ecc
1 changed files with 27 additions and 9 deletions

View File

@ -1,9 +1,16 @@
# Download-Artifact v2 Preview # Download-Artifact v2
This downloads artifacts from your build This downloads artifacts from your build
See also [upload-artifact](https://github.com/actions/upload-artifact). See also [upload-artifact](https://github.com/actions/upload-artifact).
# What's new
- Download all artifacts at once
- 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
# Usage # Usage
See [action.yml](action.yml) See [action.yml](action.yml)
@ -15,25 +22,27 @@ Basic (download to the current working directory):
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/download-artifact@v2-preview - uses: actions/download-artifact@v2
with: with:
name: my-artifact name: my-artifact
- run: cat my-artifact - name: Display structure of downloaded files
run: ls -R
``` ```
Download to a specific directory: Download to a specific directory:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/download-artifact@v2-preview - uses: actions/download-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: path/to/artifact path: path/to/artifact
- run: cat path/to/artifact - name: Display structure of downloaded files
run: ls -R
working-directory: path/to/artifact
``` ```
# Download All Artifacts # Download All Artifacts
@ -53,11 +62,13 @@ Download all artifacts to a specific directory
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/download-artifact@v2-preview - uses: actions/download-artifact@v2
with: with:
path: path/to/artifacts path: path/to/artifacts
- run: cat path/to/artifacts - name: Display structure of downloaded files
run: ls -R
working-directory: path/to/artifacts
``` ```
Download all artifacts to the current working directory Download all artifacts to the current working directory
@ -65,9 +76,16 @@ Download all artifacts to the current working directory
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/download-artifact@v2-preview - uses: actions/download-artifact@v2
- name: Display structure of downloaded files
run: ls -R
``` ```
# @actions/artifact package
Internally the [@actions/artifact](https://github.com/actions/toolkit/tree/master/packages/artifact) NPM package is used to interact with artifacts. You can find additional documentation there along with all the source code related to artifact download.
# License # License