@@ -3403,7 +3403,7 @@ const crypto = __importStar(__nccwpck_require__(6113));
34033403const stream = __importStar(__nccwpck_require__(12781));
34043404const fs = __importStar(__nccwpck_require__(57147));
34053405const errors_1 = __nccwpck_require__(37986);
3406- function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) {
3406+ function uploadZipToBlobStorage(authenticatedUploadURL, zipUploadStream) {
34073407 return __awaiter(this, void 0, void 0, function* () {
34083408 let uploadByteCount = 0;
34093409 const maxConcurrency = (0, config_1.getConcurrency)();
@@ -3430,8 +3430,8 @@ function uploadZipToBlobStorage(name, authenticatedUploadURL, zipUploadStream) {
34303430 if (!tempDirectory) {
34313431 throw new Error('Unable to get the RUNNER_TEMP env variable');
34323432 }
3433- // TODO encode the name to always have a valid filename.
3434- const tempFile = tempDirectory + '/' + name + ' .zip';
3433+ const dir = fs.mkdtempSync(tempDirectory);
3434+ const tempFile = dir + '/data .zip';
34353435 yield new Promise(resolve => {
34363436 const file = fs.createWriteStream(tempFile);
34373437 uploadStream.pipe(file);
@@ -3690,7 +3690,7 @@ function uploadArtifact(name, files, rootDirectory, options) {
36903690 }
36913691 const zipUploadStream = yield (0, zip_1.createZipUploadStream)(zipSpecification, options === null || options === void 0 ? void 0 : options.compressionLevel);
36923692 // Upload zip to blob storage
3693- const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(name, createArtifactResp.signedUploadUrl, zipUploadStream);
3693+ const uploadResult = yield (0, blob_upload_1.uploadZipToBlobStorage)(createArtifactResp.signedUploadUrl, zipUploadStream);
36943694 // finalize the artifact
36953695 const finalizeArtifactReq = {
36963696 workflowRunBackendId: backendIds.workflowRunBackendId,
0 commit comments