Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/lib/host/ActionsHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ class ActionsArtifactStore implements IArtifactStore {
public async upload(artifactName: string, files: string[]): Promise<void> {
ActionsLogger.debug(`files: ${files.join(';')}`);
await fs.emptyDir(this._resultsDirectory);
for (const file of files) {
await Promise.all(files.map((file) => {
if (path.extname(file).toLowerCase() === '.zip') {
ActionsLogger.debug(`unzipping ${file} into ${this._resultsDirectory} ...`);
await extractToFolder(file, this._resultsDirectory);
return extractToFolder(file, this._resultsDirectory);
} else {
ActionsLogger.debug(`copying ${file} into ${this._resultsDirectory} ...`);
await fs.copyFile(file, path.join(this._resultsDirectory, path.basename(file)));
return fs.copyFile(file, path.join(this._resultsDirectory, path.basename(file)));
}
}
}));

const client = artifact.create();
// pipeline has no artifact store (e.g. release pipelines):
Expand Down