add: hugoPath

This commit is contained in:
peaceiris 2019-09-16 02:03:41 +09:00
parent fddee393fc
commit 349881b966

View file

@ -41,10 +41,12 @@ async function run() {
const hugoURL = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/${hugoName}.tar.gz`; const hugoURL = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/${hugoName}.tar.gz`;
core.debug('hugoURL:', hugoURL); core.debug('hugoURL:', hugoURL);
const hugoPath = '/github/home/bin';
await io.mkdirP(hugoPath);
const hugoTarball = await tc.downloadTool(hugoURL); const hugoTarball = await tc.downloadTool(hugoURL);
const hugoExtractedFolder = await tc.extractTar(hugoTarball, '/tmp'); const hugoExtractedFolder = await tc.extractTar(hugoTarball, '/tmp');
core.debug('hugoExtractedFolder:', hugoExtractedFolder); core.debug('hugoExtractedFolder:', hugoExtractedFolder);
await io.mv(`${hugoExtractedFolder}/hugo`, '/usr/local/bin/'); await io.mv(`${hugoExtractedFolder}/hugo`, hugoPath);
} }
catch (error) { catch (error) {
core.setFailed(error.message); core.setFailed(error.message);