feat: show version of Hugo, Go, and Git

Close #23
This commit is contained in:
peaceiris 2019-09-18 03:24:56 +09:00
parent 947ed8e60f
commit 5783714f2b
3 changed files with 53 additions and 22 deletions

View file

@ -1,6 +1,7 @@
const core = require("@actions/core");
const tc = require("@actions/tool-cache");
const io = require("@actions/io");
const exec = require("@actions/exec");
const getLatestVersion = require("./get-latest-version");
// most @actions toolkit packages have async methods
@ -38,6 +39,11 @@ async function run() {
const hugoExtractedFolder = await tc.extractTar(hugoTarball, "/tmp");
core.debug("hugoExtractedFolder:", hugoExtractedFolder);
await io.mv(`${hugoExtractedFolder}/hugo`, hugoPath);
// Show version
await exec.exec('hugo version');
await exec.exec('go version');
await exec.exec('git --version');
},
function(error) {
core.setFailed(error);