Skip to content
This repository was archived by the owner on Jul 3, 2023. It is now read-only.

Commit 4087635

Browse files
author
github-actions
committed
update dist
1 parent 30243a4 commit 4087635

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

dist/index.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6720,12 +6720,28 @@ const tc = __nccwpck_require__(7784);
67206720
}
67216721
})();
67226722

6723-
const url = `https://github.com/koki-develop/qiita-cli/releases/download/${version}/qiita_${platform}_${arch}.tar.gz`;
6723+
const ext = (() => {
6724+
switch (platform) {
6725+
case "Windows":
6726+
return "zip";
6727+
default:
6728+
return "tar.gz";
6729+
}
6730+
})();
6731+
6732+
const url = `https://github.com/koki-develop/qiita-cli/releases/download/${version}/qiita_${platform}_${arch}.${ext}`;
67246733
core.info(`Downloading... ${url}`);
67256734
const cliPath = await tc.downloadTool(url);
67266735

67276736
core.info("Installing...");
6728-
const extractedPath = await tc.extractTar(cliPath);
6737+
const extractedPath = await (async () => {
6738+
switch (ext) {
6739+
case "zip":
6740+
return tc.extractZip(cliPath);
6741+
case "tar.gz":
6742+
return tc.extractTar(cliPath);
6743+
}
6744+
})();
67296745
const binPath = await tc.cacheDir(extractedPath, "qiita", "0.1.0");
67306746
core.addPath(binPath);
67316747
core.info("Installed.");

0 commit comments

Comments
 (0)