feat: Add getOS()
This commit is contained in:
parent
4b6109cfb2
commit
86eb62d73e
5 changed files with 35 additions and 26 deletions
|
|
@ -2,6 +2,7 @@ const core = require("@actions/core");
|
|||
const tc = require("@actions/tool-cache");
|
||||
const io = require("@actions/io");
|
||||
const exec = require("@actions/exec");
|
||||
const getOS = require("./get-os");
|
||||
const getLatestVersion = require("./get-latest-version");
|
||||
|
||||
// most @actions toolkit packages have async methods
|
||||
|
|
@ -22,9 +23,10 @@ async function run() {
|
|||
extendedStr = "extended_";
|
||||
}
|
||||
|
||||
console.log(`Operating System: ${process.platform}`);
|
||||
const osName = getOS(process.platform);
|
||||
console.log(`Operating System: ${osName}`);
|
||||
|
||||
const hugoName = `hugo_${extendedStr}${hugoVersion}_Linux-64bit`;
|
||||
const hugoName = `hugo_${extendedStr}${hugoVersion}_${osName}-64bit`;
|
||||
core.debug(`hugoName: ${hugoName}`);
|
||||
|
||||
const hugoURL = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/${hugoName}.tar.gz`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue