Skip to content

Commit dbe920a

Browse files
authoredJan 30, 2025··
fix: update artifact client version (#15)
1 parent 7e4ddaa commit dbe920a

File tree

10 files changed

+141245
-21876
lines changed

10 files changed

+141245
-21876
lines changed
 

‎.github/actions/setup/action.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ description: Installs the workspace's yarn dependencies and caches them
44
runs:
55
using: composite
66
steps:
7+
- name: set Yarn version
8+
run: |
9+
corepack enable
10+
yarn set version 4.5.2
11+
shell: bash
12+
713
- uses: actions/setup-node@v4
814
id: node
915
with:
1016
node-version: v20.18.1
1117
cache: 'yarn'
1218
cache-dependency-path: 'yarn.lock'
13-
19+
1420
- name: Install
1521
run: yarn --immutable
1622
shell: bash

‎.github/workflows/check-dist.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
id: diff
3535

3636
# If index.js was different than expected, upload the expected version as an artifact
37-
- uses: actions/upload-artifact@v3
37+
- uses: actions/upload-artifact@v4
3838
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
3939
with:
4040
name: dist

‎.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,12 @@ Thumbs.db
9797
# Ignore built ts files
9898
tests/runner
9999
lib
100+
101+
# Yarn
102+
.pnp.*
103+
.yarn/*
104+
!.yarn/patches
105+
!.yarn/plugins
106+
!.yarn/releases
107+
!.yarn/sdks
108+
!.yarn/versions

‎.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

‎dist/index.js

+132,483-18,252
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/licenses.txt

+2,923-396
Large diffs are not rendered by default.

‎package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@
2828
"Aztec"
2929
],
3030
"dependencies": {
31-
"@actions/core": "^1.10.0",
32-
"@octokit/core": "^4.2.0",
31+
"@actions/core": "^1.11.1",
32+
"@octokit/core": "^4.2.4",
3333
"lodash": "^4.17.21"
3434
},
3535
"devDependencies": {
36-
"@actions/artifact": "^1.1.1",
36+
"@actions/artifact": "^2.2.1",
3737
"@actions/exec": "^1.1.1",
3838
"@actions/github": "^5.1.1",
3939
"@jest/types": "^29.5.0",
@@ -68,5 +68,6 @@
6868
"^.+\\.ts$": "ts-jest"
6969
},
7070
"verbose": true
71-
}
71+
},
72+
"packageManager": "yarn@4.5.2"
7273
}

‎src/artifact.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import Zip from "adm-zip";
22
import { dirname, resolve } from "path";
33

4-
import * as artifact from "@actions/artifact";
4+
import { DefaultArtifactClient } from "@actions/artifact";
55
import * as core from "@actions/core";
66
import { context, getOctokit } from "@actions/github";
77

@@ -80,20 +80,15 @@ export async function uploadArtifact(headBranch: string, report: string) {
8080

8181
const localReportPath = resolve(report);
8282

83-
const artifactClient = artifact.create();
83+
const artifactClient = new DefaultArtifactClient();
8484

8585
core.startGroup(`Upload new report from "${localReportPath}" as artifact named "${outReport}"`);
8686
const uploadResponse = await artifactClient.uploadArtifact(
8787
outReport,
8888
[localReportPath],
89-
dirname(localReportPath),
90-
{
91-
continueOnError: false,
92-
}
89+
dirname(localReportPath)
9390
);
9491

95-
if (uploadResponse.failedItems.length > 0) throw Error("Failed to upload gas report.");
96-
97-
core.info(`Artifact ${uploadResponse.artifactName} has been successfully uploaded!`);
92+
core.info(`Artifact ${uploadResponse.id} has been successfully uploaded!`);
9893
core.endGroup();
9994
}

0 commit comments

Comments
 (0)