Commit graph

314 commits

Author SHA1 Message Date
Diane Cloud
ad638b0161
Merge 4b59965fc2 into bbbca2ddaa 2026-03-01 03:47:06 +00:00
Diane Cloud
4b59965fc2
Update README.md
# `@actions/upload-artifact`

> [!WARNING]
> actions/upload-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.

Upload [Actions Artifacts](https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts) from your Workflow Runs. Internally powered by [@actions/artifact](https://github.com/actions/toolkit/tree/main/packages/artifact) package.

See also [download-artifact](https://github.com/actions/download-artifact).

- [`@actions/upload-artifact`](#actionsupload-artifact)
  - [v6 - What's new](#v6---whats-new)
  - [v4 - What's new](#v4---whats-new)
    - [Improvements](#improvements)
    - [Breaking Changes](#breaking-changes)
  - [Usage](#usage)
    - [Inputs](#inputs)
    - [Outputs](#outputs)
  - [Examples](#examples)
    - [Upload an Individual File](#upload-an-individual-file)
    - [Upload an Entire Directory](#upload-an-entire-directory)
    - [Upload using a Wildcard Pattern](#upload-using-a-wildcard-pattern)
    - [Upload using Multiple Paths and Exclusions](#upload-using-multiple-paths-and-exclusions)
    - [Altering compressions level (speed v. size)](#altering-compressions-level-speed-v-size)
    - [Customization if no files are found](#customization-if-no-files-are-found)
    - [(Not) Uploading to the same artifact](#not-uploading-to-the-same-artifact)
    - [Environment Variables and Tilde Expansion](#environment-variables-and-tilde-expansion)
    - [Retention Period](#retention-period)
    - [Using Outputs](#using-outputs)
      - [Example output between steps](#example-output-between-steps)
      - [Example output between jobs](#example-output-between-jobs)
    - [Overwriting an Artifact](#overwriting-an-artifact)
  - [Limitations](#limitations)
    - [Number of Artifacts](#number-of-artifacts)
    - [Zip archives](#zip-archives)
    - [Permission Loss](#permission-loss)
  - [Where does the upload go?](#where-does-the-upload-go)


## v6 - What's new

> [!IMPORTANT]
> actions/upload-artifact@v6 now runs on Node.js 24 (`runs.using: node24`) and requires a minimum Actions Runner version of 2.327.1. If you are using self-hosted runners, ensure they are updated before upgrading.

### Node.js 24

This release updates the runtime to Node.js 24. v5 had preliminary support for Node.js 24, however this action was by default still running on Node.js 20. Now this action by default will run on Node.js 24.

## v4 - What's new

> [!IMPORTANT]
> upload-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/upload-artifact/releases/tag/v3) (Node 16) or [v3-node20](https://github.com/actions/upload-artifact/releases/tag/v3-node20) (Node 20).

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.

For more information, see the [`@actions/artifact`](https://github.com/actions/toolkit/tree/main/packages/artifact) documentation.

There is also a new sub-action, `actions/upload-artifact/merge`. For more info, check out that action's [README](./merge/README.md).

### Improvements

1. Uploads are significantly faster, upwards of 90% improvement in worst case scenarios.
2. Once uploaded, an Artifact ID is returned and Artifacts are immediately available in the UI and [REST API](https://docs.github.com/en/rest/actions/artifacts). Previously, you would have to wait for the run to be completed before an ID was available or any APIs could be utilized.
3. The contents of an Artifact are uploaded together into an _immutable_ archive. They cannot be altered by subsequent jobs unless the Artifacts are deleted and recreated (where they will have a new ID). Both of these factors help reduce the possibility of accidentally corrupting Artifact files.
4. The compression level of an Artifact can be manually tweaked for speed or size reduction.

### Breaking Changes

1. On self hosted runners, additional [firewall rules](https://github.com/actions/toolkit/tree/main/packages/artifact#breaking-changes) may be required.
2026-02-28 19:45:48 -08:00
Daniel Kennedy
bbbca2ddaa
Support direct file uploads (#764)
* Cache licenses

* Bump minimatch to 10.1.1

* Try fixing licenced issues

* More licensed fixes

* Support direct file uploads

* Add CI tests for direct uploads

* Use download-artifact@main temporarily

* CI: clean up artifacts on successful runs

* Use script v8

* Fix some issues with the cleanup

* Add unit tests

* Clarify naming
2026-02-25 16:04:27 -05:00
Daniel Kennedy
589182c5a4
Upgrade the module to ESM and bump dependencies (#762)
* Upgrade the module to ESM and bump dependencies

* CI: bump node versions

* Push build files

* Fix linting issues

* Bump the package version

* Cache licenses

* Bump minimatch to 10.1.1

* Try fixing licenced issues

* More licensed fixes

* eslint: don't allow common-js imports
2026-02-25 14:01:53 -05:00
Bassem Dghaidi
47309c993a
Merge pull request #754 from actions/Link-/add-proxy-integration-tests
Add proxy integration test
2026-01-30 16:47:01 +01:00
Bassem Dghaidi
02a8460834 Add proxy integration test 2026-01-30 02:29:30 -08:00
Salman Chishti
b7c566a772
Merge pull request #745 from actions/upload-artifact-v6-release
prepare release v6.0.0 for Node.js 24 support
2025-12-12 17:58:04 +00:00
Salman Muin Kayser Chishti
e516bc8500 docs: correct description of Node.js 24 support in README 2025-12-12 17:41:47 +00:00
Salman Muin Kayser Chishti
ddc45ed9bc docs: update README to correct action name for Node.js 24 support 2025-12-12 17:38:00 +00:00
Salman Muin Kayser Chishti
615b319bd2 chore: release v6.0.0 for Node.js 24 support
- Update to Node.js 24 runtime (runs.using: node24)
- Bump version to 6.0.0
- Update README with v6 release notes
- Rebuild dist
2025-12-12 17:31:54 +00:00
Salman Chishti
017748b48f
Merge pull request #744 from actions/fix-storage-blob
fix: update @actions/artifact for Node.js 24 punycode deprecation
2025-12-12 17:15:18 +00:00
Salman Muin Kayser Chishti
38d4c7997f chore: rebuild dist 2025-12-12 16:46:49 +00:00
Salman Muin Kayser Chishti
7d27270e0c chore: add missing license cache files for @actions/core, @actions/io, and minimatch 2025-12-12 16:43:44 +00:00
Salman Muin Kayser Chishti
5f643d3c94 chore: update license files for @actions/artifact@5.0.1 dependencies 2025-12-12 16:39:57 +00:00
Salman Muin Kayser Chishti
1df1684032 chore: update package-lock.json with @actions/artifact@5.0.1 2025-12-12 16:39:51 +00:00
Salman Muin Kayser Chishti
b5b1a91840 fix: update @actions/artifact to ^5.0.0 for Node.js 24 punycode fix
Updates @actions/artifact dependency to use the published npm version
which includes @azure/storage-blob ^12.29.1 that fixes the punycode
deprecation warning on Node.js 24.
2025-12-12 16:39:45 +00:00
Salman Muin Kayser Chishti
184708f738 fix: update @actions/artifact with storage-blob fix for Node.js 24 punycode deprecation 2025-12-12 15:06:59 +00:00
Salman Chishti
b340c4ff46
Merge pull request #719 from actions/node24
Upload Artifact Node 24 support
2025-12-12 14:39:28 +00:00
Salman Muin Kayser Chishti
867bba2a6b chore: add missing eslint plugins and update to compatible versions 2025-12-12 09:08:26 +00:00
Salman Muin Kayser Chishti
471b053ce1 chore: add eslint-plugin-prettier and upgrade prettier to v3 2025-12-12 09:02:29 +00:00
Salman Muin Kayser Chishti
0d59ab325a chore: add unversioned license files for @actions/core, @actions/io, and minimatch 2025-12-12 09:00:21 +00:00
Salman Muin Kayser Chishti
38cbf00a3a chore: rebuild dist files 2025-12-12 08:55:51 +00:00
Salman Muin Kayser Chishti
65c405260d fix: update license files for @bufbuild/protobuf and sax 2025-12-12 08:55:13 +00:00
Salman Muin Kayser Chishti
985108560d fix: use published @actions/artifact@5.0.0 from npm 2025-12-12 08:52:57 +00:00
Salman Muin Kayser Chishti
0d8ecc924d Merge origin/main and resolve conflicts for node24
- Updated @actions/artifact to ^5.0.0
- Updated @actions/core to ^2.0.0
- Regenerated dist files and license cache
2025-12-12 08:32:24 +00:00
Salman Muin Kayser Chishti
75274a8f39 chore: update package-lock.json 2025-12-11 23:05:12 +00:00
Salman Muin Kayser Chishti
f77a7e9888 chore: regenerate license cache for updated dependencies 2025-12-11 23:05:06 +00:00
Salman Muin Kayser Chishti
bed0e56780 chore: add license text for packages with missing licenses
- @bufbuild/protobuf: Apache-2.0 (from upstream LICENSE file)
- buffers: marked as reviewed (no license in npm)
- chainsaw: MIT/X11 (from npm registry)
2025-12-11 23:05:00 +00:00
Salman Muin Kayser Chishti
91ba4ec18c chore: update .licensed.yml config for node24 dependencies
- Add 0bsd and blueoak-1.0.0 to allowed licenses
- Add reviewed packages for dependencies with non-standard licenses
- Enable UTF-8 encoding
2025-12-11 23:04:52 +00:00
Salman Muin Kayser Chishti
87458809df chore: update dependencies to use published npm packages 2025-12-11 19:36:14 +00:00
Salman Muin Kayser Chishti
8b8de53667 chore: use local @actions/core, glob, io packages 2025-12-09 11:55:30 +00:00
Daniel Kennedy
330a01c490
Merge pull request #734 from actions/danwkennedy/prepare-5.0.0
Prepare `v5.0.0`
2025-10-24 14:15:34 -04:00
Daniel Kennedy
03f2824452 Update github.dep.yml 2025-10-24 14:06:12 -04:00
Daniel Kennedy
905a1ecb59 Prepare v5.0.0 2025-10-24 14:01:51 -04:00
Zachary Taylor
2d9f9cdfa9
Merge pull request #725 from patrikpolyak/patch-1
Update GHES guidance to include reference to Node 20 version
2025-10-23 10:20:12 -04:00
Salman Muin Kayser Chishti
d2e7727e56 update dist 2025-10-15 15:20:28 +01:00
Patrik Polyak
9687587dec
Merge branch 'main' into patch-1 2025-10-01 11:18:18 +02:00
Salman Muin Kayser Chishti
bdfe531d8f licence updates 2025-09-29 14:50:01 +01:00
Salman Muin Kayser Chishti
98d3bf521e upadate spacing 2025-09-29 14:48:36 +01:00
Salman Muin Kayser Chishti
48ddad3e02 Update to use Node 24 with local artifact package and security fixes 2025-09-29 14:44:42 +01:00
Yang Cao
2848b2cda0
Merge pull request #727 from danwkennedy/patch-1
Readme: spell out the first use of GHES
2025-09-24 09:57:02 -04:00
Daniel Kennedy
9b511775fd
Spell out the first use of GHES 2025-09-24 09:42:45 -04:00
Patrik Polyak
cd231ca1ed
Update GHES guidance to include reference to Node 20 version
`v3` uses Node 16 which is deprecated. `v3-node20` has been available for a while which uses Node 20 so we should reflect this in the documentation.
2025-09-15 12:12:01 +02:00
Salman Chishti
6c33d18d0a update to use node 24 2025-07-25 11:27:43 +00:00
Ben De St Paer-Gotch
de65e23aa2
Merge pull request #712 from actions/nebuk89-patch-1
Update README.md
2025-06-17 12:09:38 +01:00
Ben De St Paer-Gotch
8747d8cd76
Update README.md 2025-06-16 10:11:27 +01:00
Rob Herley
6027e3dd17
Merge pull request #681 from GhadimiR/patch-1
Update README.md
2025-03-25 09:24:05 -04:00
Ryan Ghadimi
d7079ed267
Merge branch 'main' into patch-1 2025-03-25 09:29:28 +00:00
Yang Cao
ea165f8d65
Merge pull request #685 from salmanmkc/salmanmkc/3-new-upload-artifacts-release
Update to use artifact 2.3.2 package & prepare for new upload-artifact release
2025-03-19 10:34:59 -07:00
Salman Chishti
08396203c1 Prepare for new release of actions/upload-artifact with new toolkit cache version 2025-03-19 05:38:34 -07:00