Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/artifact/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ const {id, size} = await artifact.uploadArtifact(
'my-artifact',
// files to include (supports absolute and relative paths)
['/absolute/path/file1.txt', './relative/file2.txt'],
// root directory
'.',
{
// optional: how long to retain the artifact
// if unspecified, defaults to repository/org retention settings (the limit of this value)
Expand Down Expand Up @@ -175,7 +177,7 @@ await artifact.listArtifacts({
If you have large files that need to be uploaded (or file types that don't compress well), you may benefit from changing the compression level of the Artifact archive. NOTE: This is a tradeoff between artifact upload time and stored data size.

```ts
await artifact.uploadArtifact('my-massive-artifact', ['big_file.bin'], {
await artifact.uploadArtifact('my-massive-artifact', ['big_file.bin'], '.', {
// The level of compression for Zlib to be applied to the artifact archive.
// - 0: No compression
// - 1: Best speed
Expand Down