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

Commit 3eaf8ef

Browse files
committed
バージョンは input から受け取るようにした
1 parent 854fe05 commit 3eaf8ef

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: 'Setup Qiita CLI'
22
description: 'Sets up Qiita CLI in your GitHub Actions workflow.'
33

4+
inputs:
5+
version:
6+
required: false
7+
description: 'The version of Qiita CLI to install.'
8+
default: 'latest'
9+
410
runs:
511
using: 'node16'
612
main: 'dist/index.js'

src/main.js

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

44
(async () => {
55
const version = (() => {
6-
const version = "0.1.0"; // TODO: get from input
6+
const version = core.getInput("version");
77
if (!version.startsWith("v")) {
88
return `v${version}`;
99
}
@@ -62,7 +62,7 @@ const tc = require("@actions/tool-cache");
6262
return tc.extractTar(cliPath);
6363
}
6464
})();
65-
const binPath = await tc.cacheDir(extractedPath, "qiita", "0.1.0");
65+
const binPath = await tc.cacheDir(extractedPath, "qiita", version);
6666
core.addPath(binPath);
6767
core.info(`Installed to ${binPath}`);
6868
})().catch((err) => {

0 commit comments

Comments
 (0)