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:
parent
2bb2aab2fd
commit
f6164bd8c8
6 changed files with 70 additions and 92 deletions
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'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue