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

Commit 8b8c3df

Browse files
committed
setup 処理を簡易的に実装
1 parent e4af432 commit 8b8c3df

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

index.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
const core = require("@actions/core");
2+
const tc = require("@actions/tool-cache");
23

3-
try {
4-
core.info("Hello World!");
5-
} catch (error) {
4+
(async () => {
5+
const url =
6+
"https://github.com/koki-develop/qiita-cli/releases/download/v0.1.0/qiita_Linux_x86_64.tar.gz";
7+
const cliPath = await tc.downloadTool(url);
8+
const extractedPath = await tc.extractTar(cliPath);
9+
const binPath = await tc.cacheDir(extractedPath, "qiita", "0.1.0");
10+
core.addPath(binPath);
11+
}).catch((error) => {
612
core.setFailed(error.message);
7-
}
13+
});

0 commit comments

Comments
 (0)