diff --git a/dist/index.js b/dist/index.js index 1b437825..4a3728fe 100644 --- a/dist/index.js +++ b/dist/index.js @@ -120047,7 +120047,7 @@ var tool_cache = __nccwpck_require__(40834); async function getLatestOpamRelease() { - const semverRange = "<2.2.0"; + const semverRange = "<2.3.0"; const octokit = lib_github.getOctokit(constants_GITHUB_TOKEN); const { data: releases } = await octokit.rest.repos.listReleases({ owner: "ocaml", @@ -120055,7 +120055,10 @@ async function getLatestOpamRelease() { per_page: 100, }); const matchedReleases = releases - .filter((release) => semver.satisfies(release.tag_name, semverRange, { loose: true })) + .filter((release) => semver.satisfies(release.tag_name, semverRange, { + includePrerelease: true, + loose: true, + })) .sort(({ tag_name: v1 }, { tag_name: v2 }) => semver.rcompare(v1, v2, { loose: true })); const latestRelease = matchedReleases[0]; if (latestRelease === undefined) { diff --git a/packages/setup-ocaml/src/opam.ts b/packages/setup-ocaml/src/opam.ts index a30d4a7e..d6dbe4a9 100644 --- a/packages/setup-ocaml/src/opam.ts +++ b/packages/setup-ocaml/src/opam.ts @@ -28,7 +28,7 @@ import { import { getCygwinVersion } from "./win32"; async function getLatestOpamRelease() { - const semverRange = "<2.2.0"; + const semverRange = "<2.3.0"; const octokit = github.getOctokit(GITHUB_TOKEN); const { data: releases } = await octokit.rest.repos.listReleases({ owner: "ocaml", @@ -37,7 +37,10 @@ async function getLatestOpamRelease() { }); const matchedReleases = releases .filter((release) => - semver.satisfies(release.tag_name, semverRange, { loose: true }) + semver.satisfies(release.tag_name, semverRange, { + includePrerelease: true, + loose: true, + }) ) .sort(({ tag_name: v1 }, { tag_name: v2 }) => semver.rcompare(v1, v2, { loose: true })