1
0
Fork 0
toolkit/packages/artifact
Rob Herley befa19f3a8
initalize artifact client as default export
2023-12-06 04:00:07 +00:00
..
__tests__ consistent promise behavior for download artifact 2023-12-05 18:35:26 +00:00
docs [Artifacts] Prepare for v2.0.0 of @actions/artifact (#1479) 2023-08-03 13:34:41 -04:00
src initalize artifact client as default export 2023-12-06 04:00:07 +00:00
CONTRIBUTIONS.md update contributing docs 2023-12-05 21:10:48 +00:00
LICENSE.md Add License.md to all npm packages (#548) 2020-08-25 16:26:50 -04:00
README.md readme & error updates 2023-12-05 21:55:22 +00:00
RELEASES.md Release notes for 1.1.1 2023-01-03 15:19:16 +01:00
package-lock.json Update dependencies 2023-09-08 14:29:27 +00:00
package.json some test updates 2023-12-01 00:31:27 +00:00
tsconfig.json use require 2023-08-22 11:33:00 -07:00

README.md

@actions/artifact

Interact programmatically with Actions Artifacts.

This is the core library that powers the @actions/upload-artifact and @actions/download-artifact actions.

v2 - Major Performance and Behavioral Improvements

[!IMPORTANT] @actions/artifact v2+, download-artifact@v4+ download-artifact@v4+ are not currently supported on GHES yet. The previous version of this package can be found at this tag and on npm.

The release of @actions/artifact@v2 (including download-artifact@v4 and download-artifact@v4) are major changes to the backend architecture of Artifacts. They have numerous performance and behavioral improvements.

Improvements

  1. All upload and download operations are exponentially faster, up to 80% faster download times and 96% faster upload times in worst case scenarios.
  2. Once uploaded, Artifacts becoming immediately available in the UI and REST API. Previously, you would have to wait for the run to be completed.
  3. Artifacts are immutable once they are uploaded. They cannot be altered by subsequent jobs. (Digest/integrity hash coming soon in API!)
  4. This library (and actions/download-artifact) now support downloading Artifacts from other repositories and runs if a GITHUB_TOKEN with sufficient actions:read permissions are provided.

Breaking changes

  1. Firewall rules required for self-hosted runners.

    If you are using self-hosted runners behind a firewall, you must have flows open to Actions endpoints. If you cannot use wildcard rules for your firewall, see the GitHub meta endpoint for specific endpoints.

    e.g.

    curl https://api.github.com/meta | jq .domains.actions
    
  2. Uploading to the same named Artifact multiple times.

    Due to the behavior of how Artifacts are created in this new version, it is no longer possible to upload to the same named Artifact multiple times. You must either split the uploads into multiple names Artifacts, or only upload once.

Example scenarios

Basic Upload and Download

Using actions/github-script

Downloading from other runs or repos

Speeding up large uploads