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
Salman Muin Kayser Chishti
c371ef827a update to node 24 runs on field 2025-09-29 14:11:41 +01:00
Salman Muin Kayser Chishti
660ddab92b audit fix 2025-09-29 13:53:42 +01:00
Salman Muin Kayser Chishti
67d513183b node24 2025-09-29 13:29:07 +01:00
Yang Cao
4a24838f3d Merge pull request #431 from danwkennedy/patch-1
Readme: spell out the first use of GHES
2025-09-24 09:48:26 -04:00
Daniel Kennedy
5e3251c4ff Readme: spell out the first use of GHES 2025-09-24 09:44:57 -04:00
Yang Cao
abefc31eaf Merge pull request #424 from actions/yacaovsnc/update_readme
Update README with artifact extraction details
2025-08-25 16:23:50 -04:00
Yang Cao
ac43a6070a Update README with artifact extraction details
Clarified note on artifact extraction and GHES support.
2025-08-25 14:32:17 -04:00
Yang Cao
de96f4613b Merge pull request #417 from actions/yacaovsnc/update_readme
Update README for download-artifact v5 changes
2025-08-06 09:03:16 -04:00
Yang Cao
7993cb44e9 Remove migration guide for artifact download changes
Readme probably should be less verbose since it's not a changelog.
2025-08-05 18:06:12 -04:00
Yang Cao
2653c123b8 Update README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-05 18:02:37 -04:00
Yang Cao
7d782037f3 Update README for download-artifact v5 changes
Updated documentation for download-artifact action to reflect changes in version 5.
2025-08-05 18:01:53 -04:00
10 changed files with 125147 additions and 108140 deletions

View File

@@ -18,10 +18,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Setup Node 20
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 20.x
cache: 'npm'

View File

@@ -20,7 +20,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v5
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL

View File

@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
name: Check licenses
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: npm ci
- name: Install licensed
run: |

View File

@@ -14,7 +14,7 @@ jobs:
steps:
- name: Checking out
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Publish
id: publish
uses: actions/publish-immutable-action@0.0.3

View File

@@ -20,10 +20,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node 20
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 20.x
cache: 'npm'

View File

@@ -5,6 +5,7 @@ Download [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/
See also [upload-artifact](https://github.com/actions/upload-artifact).
- [`@actions/download-artifact`](#actionsdownload-artifact)
- [v5 - What's new](#v5---whats-new)
- [v4 - What's new](#v4---whats-new)
- [Improvements](#improvements)
- [Breaking Changes](#breaking-changes)
@@ -21,11 +22,24 @@ See also [upload-artifact](https://github.com/actions/upload-artifact).
- [Limitations](#limitations)
- [Permission Loss](#permission-loss)
## v5 - What's new
Previously, **single artifact downloads** behaved differently depending on how you specified the artifact:
- **By name**: `name: my-artifact` → extracted to `path/` (direct)
- **By ID**: `artifact-ids: 12345` → extracted to `path/my-artifact/` (nested)
Now both methods are consistent:
- **By name**: `name: my-artifact` → extracted to `path/` (unchanged)
- **By ID**: `artifact-ids: 12345` → extracted to `path/` (updated - now direct)
Note: This change also applies to patterns that only match a single artifact.
## v4 - What's new
> [!IMPORTANT]
> download-artifact@v4+ is not currently supported on GHES yet. If you are on GHES, you must use [v3](https://github.com/actions/download-artifact/releases/tag/v3).
> download-artifact@v4+ is not currently supported on GitHub Enterprise Server (GHES) yet. If you are on GHES, you must use [v3](https://github.com/actions/download-artifact/releases/tag/v3).
The release of upload-artifact@v4 and download-artifact@v4 are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.
@@ -66,7 +80,7 @@ You are welcome to still raise bugs in this repo.
### Inputs
```yaml
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
# Name of the artifact to download.
# If unspecified, all artifacts for the run are downloaded.
@@ -124,7 +138,7 @@ Download to current working directory (`$GITHUB_WORKSPACE`):
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
name: my-artifact
- name: Display structure of downloaded files
@@ -135,7 +149,7 @@ Download to a specific directory (also supports `~` expansion):
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
name: my-artifact
path: your/destination/dir
@@ -151,7 +165,7 @@ Download a single artifact by ID to the current working directory (`$GITHUB_WORK
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
artifact-ids: 12345
- name: Display structure of downloaded files
@@ -162,7 +176,7 @@ Download a single artifact by ID to a specific directory:
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
artifact-ids: 12345
path: your/destination/dir
@@ -176,7 +190,7 @@ Multiple artifacts can be downloaded by providing a comma-separated list of IDs:
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
artifact-ids: 12345,67890
path: path/to/artifacts
@@ -204,7 +218,7 @@ Download all artifacts to the current working directory:
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
- name: Display structure of downloaded files
run: ls -R
```
@@ -213,7 +227,7 @@ Download all artifacts to a specific directory:
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
path: path/to/artifacts
- name: Display structure of downloaded files
@@ -224,7 +238,7 @@ To download them to the _same_ directory:
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
path: path/to/artifacts
merge-multiple: true
@@ -264,7 +278,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
path: my-artifact
pattern: my-artifact-*
@@ -287,7 +301,7 @@ It may be useful to download Artifacts from other workflow runs, or even other r
```yaml
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v5
with:
name: my-other-artifact
github-token: ${{ secrets.GH_PAT }} # token with actions:read permissions on target repo

View File

@@ -39,5 +39,5 @@ outputs:
download-path:
description: 'Path of artifact download'
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.js'

218276
dist/index.js vendored

File diff suppressed because one or more lines are too long

14952
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -29,7 +29,7 @@
},
"homepage": "https://github.com/actions/download-artifact#readme",
"dependencies": {
"@actions/artifact": "^2.3.2",
"@actions/artifact": "file:../packages/artifact",
"@actions/core": "^1.10.1",
"@actions/github": "^5.1.1",
"minimatch": "^9.0.3"
@@ -48,5 +48,8 @@
"ts-jest": "^29.2.6",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"overrides": {
"uri-js": "npm:uri-js-replace@^1.0.1"
}
}