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

Commit 84b61a4

Browse files
committed
ログ出力を追加
1 parent 8303539 commit 84b61a4

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

index.js

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,28 @@ const core = require("@actions/core");
22
const tc = require("@actions/tool-cache");
33

44
(async () => {
5-
const url =
6-
"https://github.com/koki-develop/qiita-cli/releases/download/v0.1.0/qiita_Linux_x86_64.tar.gz";
5+
const version = (() => {
6+
const version = "0.1.0"; // TODO: get from input
7+
if (!version.startsWith("v")) {
8+
return `v${version}`;
9+
}
10+
})();
11+
core.info(`version: ${version}`);
12+
13+
const platform = process.platform;
14+
const arch = process.arch;
15+
core.info(`platform: ${platform}`);
16+
core.info(`arch: ${arch}`);
17+
18+
core.info("Downloading...");
19+
const url = `https://github.com/koki-develop/qiita-cli/releases/download/${version}/qiita_Linux_x86_64.tar.gz`;
720
const cliPath = await tc.downloadTool(url);
21+
22+
core.info("Installing...");
823
const extractedPath = await tc.extractTar(cliPath);
924
const binPath = await tc.cacheDir(extractedPath, "qiita", "0.1.0");
1025
core.addPath(binPath);
26+
core.info("Installed.");
1127
})().catch((err) => {
1228
core.setFailed(err.message);
1329
});

0 commit comments

Comments
 (0)