mirror of
https://github.com/peaceiris/actions-hugo.git
synced 2026-01-24 10:47:28 +01:00
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:
@@ -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`);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user