mirror of
https://github.com/trympet/nextcloud-artifacts-action.git
synced 2025-04-24 20:16:08 +02:00
test
This commit is contained in:
parent
e96c1262aa
commit
75e2916679
851
dist/index.js
vendored
851
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@ -106,10 +106,16 @@ export class NextcloudClient {
|
||||
const tempArtifactDir = path.join(os.tmpdir(), this.guid);
|
||||
const artifactPath = path.join(tempArtifactDir, `artifact-${this.artifact}`);
|
||||
await fs.mkdir(path.join(artifactPath, this.artifact), { recursive: true });
|
||||
const copies = [];
|
||||
for (let spec of specs) {
|
||||
await fs.copyFile(spec.absolutePath, path.join(artifactPath, spec.uploadPath));
|
||||
const dstpath = path.join(artifactPath, spec.uploadPath);
|
||||
const promise = fs.mkdir(path.dirname(dstpath))
|
||||
.then(() => fs.copyFile(spec.absolutePath, dstpath))
|
||||
copies.push(promise);
|
||||
}
|
||||
|
||||
await Promise.all(copies);
|
||||
|
||||
const archivePath = path.join(artifactPath, `${this.artifact}.zip`);
|
||||
await this.zip(path.join(artifactPath, this.artifact), archivePath);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user