Skip to content

Commit 8bd73b1

Browse files
authored
Update actions.ts
1 parent df167fa commit 8bd73b1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/actions.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
import * as artifact from '@actions/artifact'
1+
import {DefaultArtifactClient} from '@actions/artifact'
22
import { startGroup, endGroup, getInput } from '@actions/core'
33
import { context, getOctokit } from '@actions/github'
44
import { retry } from '@octokit/plugin-retry'
55
import { Md5 } from 'ts-md5'
66

7+
const artifact = new DefaultArtifactClient()
8+
79
export async function uploadArtifact(artifactName: string, ...files: string[]) {
810
startGroup('Uploading artifact ' + artifactName)
9-
await artifact.create().uploadArtifact(artifactName, files, '.')
11+
await artifact.uploadArtifact(artifactName, files, '.')
1012
endGroup()
1113
}
1214

1315
export async function downloadArtifact(artifactName: string) {
1416
startGroup('Downloading artifact ' + artifactName)
15-
await artifact.create().downloadArtifact(artifactName, '.', {
17+
await artifact.downloadArtifact(artifactName, '.', {
1618
createArtifactFolder: true,
1719
})
1820
endGroup()

0 commit comments

Comments
 (0)