mirror of
https://github.com/actions/setup-go.git
synced 2025-06-19 20:07:12 +02:00
Remove stable input and fix SemVer notation (#195)
This commit is contained in:
13
src/main.ts
13
src/main.ts
@ -14,23 +14,14 @@ export async function run() {
|
||||
//
|
||||
let versionSpec = core.getInput('go-version');
|
||||
|
||||
// stable will be true unless false is the exact input
|
||||
// since getting unstable versions should be explicit
|
||||
let stable = (core.getInput('stable') || 'true').toUpperCase() === 'TRUE';
|
||||
|
||||
core.info(`Setup go ${stable ? 'stable' : ''} version spec ${versionSpec}`);
|
||||
core.info(`Setup go version spec ${versionSpec}`);
|
||||
|
||||
if (versionSpec) {
|
||||
let token = core.getInput('token');
|
||||
let auth = !token || isGhes() ? undefined : `token ${token}`;
|
||||
|
||||
const checkLatest = core.getBooleanInput('check-latest');
|
||||
const installDir = await installer.getGo(
|
||||
versionSpec,
|
||||
stable,
|
||||
checkLatest,
|
||||
auth
|
||||
);
|
||||
const installDir = await installer.getGo(versionSpec, checkLatest, auth);
|
||||
|
||||
core.exportVariable('GOROOT', installDir);
|
||||
core.addPath(path.join(installDir, 'bin'));
|
||||
|
Reference in New Issue
Block a user