Skip to content

Commit a546f89

Browse files
authored
Resolves artifact's breaking changes (#196)
* Resolves artifact's breaking changes * Debugging * Debugging * Clean up
1 parent 050502e commit a546f89

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

dist/main/index.js

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/main/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const artifact = require('@actions/artifact');
1+
const {DefaultArtifactClient} = require('@actions/artifact');
22
const core = require('@actions/core');
33
const exec = require('@actions/exec');
44
const github = require('@actions/github');
@@ -113,18 +113,17 @@ async function genhtml(coverageFiles, tmpPath) {
113113
await exec.exec('genhtml', args, { cwd: workingDirectory });
114114

115115
if (artifactName !== '') {
116+
const artifact = new DefaultArtifactClient();
116117
const globber = await glob.create(`${artifactPath}/**`);
117-
const htmlFiles = await globber.glob();
118+
const htmlFiles = (await globber.glob()).filter(item => item !== artifactPath);
118119

119120
core.info(`Uploading artifacts.`);
120121

121122
await artifact
122-
.create()
123123
.uploadArtifact(
124124
artifactName,
125125
htmlFiles,
126126
artifactPath,
127-
{ continueOnError: false },
128127
);
129128
} else {
130129
core.info("Skip uploading artifacts");

0 commit comments

Comments
 (0)