diff --git a/__tests__/setup-go.test.ts b/__tests__/setup-go.test.ts index 840ff43d7..28a9b46ec 100644 --- a/__tests__/setup-go.test.ts +++ b/__tests__/setup-go.test.ts @@ -557,8 +557,8 @@ describe('setup-go', () => { // 1.13.1 => 1.13.1 // 1.13 => 1.13.0 - // 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1 - // 1.8.5beta1 => 1.8.5-beta1, 1.8.5rc1 => 1.8.5-rc1 + // 1.10beta1 => 1.10.0-beta.1, 1.10rc1 => 1.10.0-rc.1 + // 1.8.5beta1 => 1.8.5-beta.1, 1.8.5rc1 => 1.8.5-rc.1 it('converts prerelease versions', async () => { expect(im.makeSemver('1.10beta1')).toBe('1.10.0-beta.1'); expect(im.makeSemver('1.10rc1')).toBe('1.10.0-rc.1'); diff --git a/action.yml b/action.yml index 1db16c928..04a17d290 100644 --- a/action.yml +++ b/action.yml @@ -7,9 +7,6 @@ inputs: check-latest: description: 'Set this option to true if you want the action to always check for the latest available version that satisfies the version spec' default: false - stable: - description: 'Whether to download only stable versions' - default: 'true' token: description: Used to pull node distributions from go-versions. Since there's a default, this is typically not supplied by the user. default: ${{ github.token }} diff --git a/dist/index.js b/dist/index.js index 537d58f7a..fe9439532 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2074,10 +2074,6 @@ function run() { // If not supplied then problem matchers will still be setup. Useful for self-hosted. // 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}`); if (versionSpec) { let token = core.getInput('token'); let auth = !token || isGhes() ? undefined : `token ${token}`; @@ -6086,8 +6082,8 @@ exports.getVersionsDist = getVersionsDist; // Convert the go version syntax into semver for semver matching // 1.13.1 => 1.13.1 // 1.13 => 1.13.0 -// 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1 -// 1.8.5beta1 => 1.8.5-beta1, 1.8.5rc1 => 1.8.5-rc1 +// 1.10beta1 => 1.10.0-beta.1, 1.10rc1 => 1.10.0-rc.1 +// 1.8.5beta1 => 1.8.5-beta.1, 1.8.5rc1 => 1.8.5-rc.1 function makeSemver(version) { var _a; version = version.replace('go', ''); diff --git a/src/installer.ts b/src/installer.ts index 7fef3cdf3..b9d6c36fb 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -271,8 +271,8 @@ export async function getVersionsDist( // Convert the go version syntax into semver for semver matching // 1.13.1 => 1.13.1 // 1.13 => 1.13.0 -// 1.10beta1 => 1.10.0-beta1, 1.10rc1 => 1.10.0-rc1 -// 1.8.5beta1 => 1.8.5-beta1, 1.8.5rc1 => 1.8.5-rc1 +// 1.10beta1 => 1.10.0-beta.1, 1.10rc1 => 1.10.0-rc.1 +// 1.8.5beta1 => 1.8.5-beta.1, 1.8.5rc1 => 1.8.5-rc.1 export function makeSemver(version: string): string { version = version.replace('go', ''); version = version.replace('beta', '-beta.').replace('rc', '-rc.'); diff --git a/src/main.ts b/src/main.ts index 452308f4e..8836c46da 100644 --- a/src/main.ts +++ b/src/main.ts @@ -14,12 +14,6 @@ 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}`); - if (versionSpec) { let token = core.getInput('token'); let auth = !token || isGhes() ? undefined : `token ${token}`;