goreleaser-action/src/main.ts

19 lines
476 B
TypeScript
Raw Normal View History

2019-09-20 20:23:45 +00:00
import * as installer from './installer';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
async function run() {
try {
const version = core.getInput('version') || 'latest';
const args = core.getInput('args');
const goreleaser = await installer.getGoReleaser(version);
console.log('🏃 Running GoReleaser...');
await exec.exec(`${goreleaser} ${args}`);
} catch (error) {
core.setFailed(error.message);
}
}
run();