diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index 6b6d5f956..f10e9cac6 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -39,8 +39,8 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - go: [1.12.16, 1.13.11, 1.14.3] + os: [ubuntu-latest] + go: [1.16-beta1, 1.16] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/dist/index.js b/dist/index.js index 8c745f3f7..a2b7ac400 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5150,9 +5150,17 @@ function findMatch(versionSpec, stable) { if (parts.length == 2) { version = version + '.0'; } - core.debug(`check ${version} satisfies ${versionSpec}`); - if (semver.satisfies(version, versionSpec) && - (!stable || candidate.stable === stable)) { + + let satisfied = semver.satisfies(version, versionSpec); + + if(!satisfied) { + core.debug(`${version} doesn't satisfy ${versionSpec}`); + continue; + } + + core.debug(`${version} does satisfy ${versionSpec}`); + + if (!stable || candidate.stable === stable) { goFile = candidate.files.find(file => { core.debug(`${file.arch}===${archFilter} && ${file.os}===${platFilter}`); return file.arch === archFilter && file.os === platFilter; @@ -5161,7 +5169,9 @@ function findMatch(versionSpec, stable) { core.debug(`matched ${candidate.version}`); match = candidate; break; - } + } else { + core.debug(`version statisfied ${candidateversion}, but coulnd't find supported platform and/or architecture`); + } } } if (match && goFile) { @@ -5451,4 +5461,4 @@ exports.exec = exec; /***/ }) -/******/ }); \ No newline at end of file +/******/ }); diff --git a/src/installer.ts b/src/installer.ts index 0e0d5d399..42b9e98fe 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -210,11 +210,17 @@ export async function findMatch( version = version + '.0'; } - core.debug(`check ${version} satisfies ${versionSpec}`); - if ( - semver.satisfies(version, versionSpec) && - (!stable || candidate.stable === stable) - ) { + let satisfied = semver.satisfies(version, versionSpec); + + if(!satisfied) { + core.debug(`${version} doesn't satisfy ${versionSpec}`); + continue; + } + + core.debug(`${version} does satisfy ${versionSpec}`); + + if (!stable || candidate.stable === stable) + { goFile = candidate.files.find(file => { core.debug( `${file.arch}===${archFilter} && ${file.os}===${platFilter}`