1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-go synced 2025-06-10 04:22:22 +02:00

Remove stable input and fix SemVer notation (#195)

This commit is contained in:
Dmitry Shibanov 2022-02-28 10:16:32 +03:00 committed by GitHub
parent 2bb2aab2fd
commit f6164bd8c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 70 additions and 92 deletions

View file

@ -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'));