Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3c37ab4

Browse files
committed
Test with unique artifact name for v4 update
1 parent 2992a95 commit 3c37ab4

File tree

3 files changed

+21
-16
lines changed

3 files changed

+21
-16
lines changed

lib/debug-artifacts.js

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

lib/debug-artifacts.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/debug-artifacts.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export async function uploadDebugArtifacts(
6060
try {
6161
if (ghVariant === GitHubVariant.GHES) {
6262
await artifactLegacy.create().uploadArtifact(
63-
sanitizeArifactName(`${artifactName}${suffix}`),
63+
sanitizeArifactName(`${artifactName}${suffix}}`),
6464
toUpload.map((file) => path.normalize(file)),
6565
path.normalize(rootDir),
6666
{
@@ -71,15 +71,18 @@ export async function uploadDebugArtifacts(
7171
);
7272
} else {
7373
const artifactClient = new artifact.DefaultArtifactClient();
74-
await artifactClient.uploadArtifact(
75-
sanitizeArifactName(`${artifactName}${suffix}`),
76-
toUpload.map((file) => path.normalize(file)),
77-
path.normalize(rootDir),
78-
{
79-
// ensure we don't keep the debug artifacts around for too long since they can be large.
80-
retentionDays: 7,
81-
},
82-
);
74+
75+
for (const file of toUpload) {
76+
await artifactClient.uploadArtifact(
77+
sanitizeArifactName(`${artifactName}${suffix}-${file}`),
78+
[path.normalize(file)],
79+
path.normalize(rootDir),
80+
{
81+
// ensure we don't keep the debug artifacts around for too long since they can be large.
82+
retentionDays: 7,
83+
},
84+
);
85+
}
8386
}
8487
} catch (e) {
8588
// A failure to upload debug artifacts should not fail the entire action.

0 commit comments

Comments
 (0)