gha: Enhance workflows (#102)

* gha: Add Pull Request to stale target
* gha: Add ncc check step (Close #98 )
* src: Rename showVersion()
* test: Add not to be cases
* Remove old comment
* gha: Add update major tag workflow (Close #97 )
This commit is contained in:
Shohei Ueda
2019-12-08 15:45:59 +09:00
committed by GitHub
parent bc6f48c683
commit 739a95f1e7
8 changed files with 40 additions and 18 deletions

View File

@@ -5,7 +5,6 @@ export default function getOS(platform: string) {
return 'macOS';
} else if (platform === 'win32') {
return 'Windows';
// throw new Error("Windows is not supported");
} else {
throw new Error(`${platform} is not supported`);
}

View File

@@ -5,8 +5,7 @@ import installer from './installer';
// most @actions toolkit packages have async methods
async function run() {
const dump = async () => {
// Show version
const showVersion = async () => {
await exec.exec('hugo version');
};
@@ -18,7 +17,7 @@ async function run() {
async function(latestVersion): Promise<void> {
console.log(`Hugo version: ${latestVersion} (${hugoVersion})`);
await installer(latestVersion);
await dump();
await showVersion();
},
function(error) {
core.setFailed(error);
@@ -27,7 +26,7 @@ async function run() {
} else {
console.log(`Hugo version: ${hugoVersion}`);
await installer(hugoVersion);
await dump();
await showVersion();
}
} catch (error) {
core.setFailed(error.message);