Update original import statements to use artifact-legacy

This commit is contained in:
Angela P Wen
2024-09-25 12:08:39 -07:00
parent 76b799de1d
commit 6d887c18f0
6 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ exports.tryUploadAllAvailableDebugArtifacts = tryUploadAllAvailableDebugArtifact
exports.uploadDebugArtifacts = uploadDebugArtifacts;
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const artifact = __importStar(require("@actions/artifact"));
const artifactLegacy = __importStar(require("@actions/artifact-legacy"));
const core = __importStar(require("@actions/core"));
const adm_zip_1 = __importDefault(require("adm-zip"));
const del_1 = __importDefault(require("del"));
@@ -189,7 +189,7 @@ async function uploadDebugArtifacts(toUpload, rootDir, artifactName) {
core.info("Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input.");
}
}
await artifact.create().uploadArtifact(sanitizeArtifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), {
await artifactLegacy.create().uploadArtifact(sanitizeArtifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), {
continueOnError: true,
// ensure we don't keep the debug artifacts around for too long since they can be large.
retentionDays: 7,