Compare commits

..

41 Commits

Author SHA1 Message Date
eggyhead
7f2adb9ead Revert "deleting minimatch license dep"
This reverts commit f60105d0b9.
2024-04-17 00:35:15 +00:00
eggyhead
b54a9b6fe5 Merge branch 'main' into eggyhead/update-artifact-2.1.5 2024-04-16 17:30:32 -07:00
Rob Herley
f8aaee4a21 Merge pull request #322 from actions/robherley/deprecation-notice
Update readme with v3/v2/v1 deprecation notice
2024-04-16 17:13:40 -04:00
Rob Herley
d98334b11d Update readme with v3/v2/v1 deprecation notice
- https://github.blog/changelog/2024-02-13-deprecation-notice-v1-and-v2-of-the-artifact-actions/
- https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
2024-04-16 16:50:38 -04:00
Your Name
f60105d0b9 deleting minimatch license dep 2024-04-16 13:29:58 -07:00
eggyhead
0d3f4c92a7 updating @actions/core license 2024-04-16 19:56:51 +00:00
eggyhead
defbcabd27 updating artifact license 2024-04-16 19:54:04 +00:00
eggyhead
e961f587f9 Revert "updating licensed cache"
This reverts commit 2fa39f3ad7.
2024-04-16 19:51:20 +00:00
Your Name
2fa39f3ad7 updating licensed cache 2024-04-16 12:38:47 -07:00
eggyhead
cbe11d7b94 updating release 2024-04-16 18:25:39 +00:00
eggyhead
0baa647135 updating @actions/artifact to v2.1.5 2024-04-16 18:20:15 +00:00
Bethany
c850b930e6 Merge pull request #307 from bethanyj28/main
Update @actions/artifact
2024-03-01 13:27:40 -05:00
bethanyj28
6fd111f15a update @actions/artifact 2024-03-01 13:20:31 -05:00
Bethany
87c55149d9 Merge pull request #303 from bethanyj28/main
Update @actions/artifact
2024-02-26 10:45:15 -05:00
bethanyj28
47f9ce604f update @actions/artifact 2024-02-26 10:40:04 -05:00
Bethany
127824d34c Merge pull request #299 from bethanyj28/main
Update toolkit dependency with updated unzip logic
2024-02-23 16:56:43 -05:00
bethanyj28
6dd49bff0a licensed only artifact 2024-02-23 16:51:43 -05:00
bethanyj28
f71c0e3da3 Revert "licensed"
This reverts commit 7c63dfde29.
2024-02-23 16:51:09 -05:00
bethanyj28
7c63dfde29 licensed 2024-02-23 16:49:11 -05:00
bethanyj28
67d37cd346 Update toolkit 2024-02-23 16:42:29 -05:00
Konrad Pabjan
348754975e Update release-new-action-version.yml (#292) 2024-02-05 17:20:20 -05:00
eggyhead
eaceaf801f Merge pull request #291 from actions/eggyhead/update-artifact-v2.1.1
updating artifact dependency to version 2.1.1
2024-02-05 13:20:19 -08:00
eggyhead
81eafdc926 update artifact license 2024-02-05 17:53:17 +00:00
eggyhead
9ac5cad9e2 updating artifact dependency to version 2.1.1 2024-02-05 17:25:55 +00:00
Rob Herley
3ad8411bbd Merge pull request #287 from actions/robherley/sync-migration-docs
Sync migration docs with upload-artifact
2024-01-31 12:42:51 -05:00
Rob Herley
1de464352c Sync migration docs with upload-artifact
We've updated them quite a bit in upload-artifact so let's make sure we're consistent.
2024-01-31 12:36:02 -05:00
Rob Herley
bb3fa7fd35 Merge pull request #275 from actions/robherley/better-log-msgs
Clarify log messages when using `pattern` or `merge-multiple` params
2024-01-10 16:00:02 -05:00
Rob Herley
a244de5a62 ncc 2024-01-10 15:17:47 -05:00
Rob Herley
355659bff2 clarify log messages when using pattern/merge-multiple params 2024-01-10 15:15:52 -05:00
Vallie Joseph
6b208ae046 Merge pull request #274 from actions/vmjoseph/timeout-patch
Add patch fix for transient timeout issues from new artifact's package
2024-01-10 12:01:10 -05:00
Vallie Joseph
6c5b5806e1 only adding updated license 2024-01-10 16:49:33 +00:00
Vallie Joseph
5f5015dc38 readding index 2024-01-10 16:48:45 +00:00
Vallie Joseph
1fddaaf0f1 Revert "updating licenses"
This reverts commit 657edd9b81.
2024-01-10 16:48:01 +00:00
Vallie Joseph
8aa9e2115b Revert "updating dist"
This reverts commit 555a2fc129.
2024-01-10 16:47:16 +00:00
Vallie Joseph
657edd9b81 updating licenses 2024-01-10 16:44:54 +00:00
Vallie Joseph
555a2fc129 updating dist 2024-01-10 16:18:33 +00:00
Vallie Joseph
4fc4d70d4c updating lock 2024-01-10 16:12:36 +00:00
Vallie Joseph
072ac9dceb updating version no 2024-01-10 16:00:45 +00:00
Vallie Joseph
038dc0329f updating version no 2024-01-10 15:59:40 +00:00
Vallie Joseph
3f40cd641f updating release 2024-01-10 15:58:28 +00:00
Vallie Joseph
82c243c150 updating artifacts package 2024-01-10 15:31:35 +00:00
9 changed files with 25346 additions and 19481 deletions

View File

@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update the ${{ env.TAG_NAME }} tag
uses: actions/publish-action@v0.2.1
uses: actions/publish-action@v0.3.0
with:
source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}

View File

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

View File

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

View File

@@ -1,5 +1,11 @@
# `@actions/download-artifact`
> [!WARNING]
> actions/download-artifact@v3 is scheduled for deprecation on **November 30, 2024**. [Learn more.](https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/)
> Similarly, v1/v2 are scheduled for deprecation on **June 30, 2024**.
> Please update your workflow to use v4 of the artifact actions.
> This deprecation will not impact any existing versions of GitHub Enterprise Server being used by customers.
Download [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) from your Workflow Runs. Internally powered by the [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/artifact) package.
See also [upload-artifact](https://github.com/actions/upload-artifact).

38762
dist/index.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,8 @@
- [Migration](#migration)
- [Multiple uploads to the same named Artifact](#multiple-uploads-to-the-same-named-artifact)
- [Overwriting an Artifact](#overwriting-an-artifact)
- [Merging multiple artifacts](#merging-multiple-artifacts)
Several behavioral differences exist between Artifact actions `v3` and below vs `v4`. This document outlines common scenarios in `v3`, and how they would be handled in `v4`.
@@ -31,6 +33,7 @@ jobs:
- name: Download All Artifacts
uses: actions/download-artifact@v3
with:
name: my-artifact
path: my-artifact
- run: ls -R my-artifact
```
@@ -71,6 +74,7 @@ jobs:
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
- name: my-artifact
path: my-artifact
+ pattern: my-artifact-*
+ merge-multiple: true
@@ -78,3 +82,127 @@ jobs:
```
In `v4`, the new `pattern:` input will filter the downloaded Artifacts to match the name specified. The new `merge-multiple:` input will support downloading multiple Artifacts to the same directory. If the files within the Artifacts have the same name, the last writer wins.
## Overwriting an Artifact
In `v3`, the contents of an Artifact were mutable so something like the following was possible:
```yaml
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Create a file
run: echo "hello world" > my-file.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: my-artifact # NOTE: same artifact name
path: my-file.txt
upload-again:
needs: upload
runs-on: ubuntu-latest
steps:
- name: Create a different file
run: echo "goodbye world" > my-file.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: my-artifact # NOTE: same artifact name
path: my-file.txt
```
The resulting `my-file.txt` in `my-artifact` will have "goodbye world" as the content.
In `v4`, Artifacts are immutable unless deleted. To achieve this same behavior, you can use `overwrite: true` to delete the Artifact before a new one is created:
```diff
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Create a file
run: echo "hello world" > my-file.txt
- name: Upload Artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: my-artifact # NOTE: same artifact name
path: my-file.txt
upload-again:
needs: upload
runs-on: ubuntu-latest
steps:
- name: Create a different file
run: echo "goodbye world" > my-file.txt
- name: Upload Artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: my-artifact # NOTE: same artifact name
path: my-file.txt
+ overwrite: true
```
Note that this will create an _entirely_ new Artifact, with a different ID from the previous.
## Merging multiple artifacts
In `v3`, multiple uploads from multiple jobs could be done to the same Artifact. This would result in a single archive, which could be useful for sending to upstream systems outside of Actions via API or UI downloads.
```yaml
jobs:
upload:
strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Create a File
run: echo "hello from ${{ matrix.runs-on }}" > file-${{ matrix.runs-on }}.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: all-my-files # NOTE: same artifact name
path: file-${{ matrix.runs-on }}.txt
```
The single `all-my-files` artifact would contain the following:
```
.
∟ file-ubuntu-latest.txt
∟ file-macos-latest.txt
∟ file-windows-latest.txt
```
To achieve the same in `v4` you can change it like so:
```diff
jobs:
upload:
strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Create a File
run: echo "hello from ${{ matrix.runs-on }}" > file-${{ matrix.runs-on }}.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
- name: all-my-files
+ name: my-artifact-${{ matrix.runs-on }}
path: file-${{ matrix.runs-on }}.txt
+ merge:
+ runs-on: ubuntu-latest
+ needs: upload
+ steps:
+ - name: Merge Artifacts
+ uses: actions/upload-artifact/merge@v4
+ with:
+ name: all-my-files
+ pattern: my-artifact-*
```
Note that this will download all artifacts to a temporary directory and reupload them as a single artifact. For more information on inputs and other use cases for `actions/upload-artifact/merge@v4`, see [the action documentation](../merge/README.md).

5908
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "download-artifact",
"version": "4.0.0",
"version": "4.1.4",
"description": "Download an Actions Artifact from a workflow run",
"main": "dist/index.js",
"scripts": {
@@ -28,7 +28,7 @@
},
"homepage": "https://github.com/actions/download-artifact#readme",
"dependencies": {
"@actions/artifact": "^2.0.0",
"@actions/artifact": "^2.1.5",
"@actions/core": "^1.10.0",
"@actions/github": "^5.1.1",
"minimatch": "^9.0.3"

View File

@@ -75,10 +75,6 @@ async function run(): Promise<void> {
artifacts = [targetArtifact]
} else {
core.info(
`No input name specified, downloading all artifacts. Extra directory with the artifact name will be created for each download`
)
const listArtifactResponse = await artifactClient.listArtifacts({
latest: true,
...options
@@ -94,6 +90,15 @@ async function run(): Promise<void> {
core.debug(
`Filtered from ${listArtifactResponse.artifacts.length} to ${artifacts.length} artifacts`
)
} else {
core.info(
'No input name or pattern filtered specified, downloading all artifacts'
)
if (!inputs.mergeMultiple) {
core.info(
'An extra directory with the artifact name will be created for each download'
)
}
}
}