Skip to content

Commit 16c4f3e

Browse files
Copilotfelickz
andauthored
Add latest-N offset and semver range support for tools input
Co-authored-by: felickz <1760475+felickz@users.noreply.github.com>
1 parent 8c514cb commit 16c4f3e

6 files changed

Lines changed: 426 additions & 22 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ See the [releases page](https://github.com/github/codeql-action/releases) for th
55
## [UNRELEASED]
66

77
- The `tools` input for the `init` and `setup-codeql` Actions now accepts a bare CodeQL CLI version number, for example `2.19.0` or `v2.19.0`. The Action will automatically download the CodeQL Bundle release asset that matches the runner's operating system and architecture, preferring the smaller `zstd`-compressed bundle where it is supported.
8+
- The `tools` input also now accepts a CodeQL CLI version range, for example `2.24.x`, `2.x`, `~2.24.0`, or `^2.24.0`, as well as `latest-<N>` (for example `latest-1`), which resolves to the CodeQL Bundle release `N` stable releases before the most recent one.
89

910
## 4.37.5 - 03 Aug 2026
1011

‎init/action.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ inputs:
1313
- A CodeQL CLI version number, for example `2.19.0` or `v2.19.0`, in which case the CodeQL
1414
Bundle containing that version will be downloaded, selecting the archive format and
1515
release asset that matches the runner's operating system and architecture, or
16+
- A CodeQL CLI version range, for example `2.24.x`, `2.x`, `~2.24.0`, or `^2.24.0`, in
17+
which case the most recent stable CodeQL Bundle release satisfying that range will be
18+
downloaded, or
19+
- `latest-<N>`, for example `latest-1` or `LATEST-2` (matching is case insensitive), which
20+
uses the CodeQL Bundle release `N` stable releases before the most recent one, or
1621
- A special value `linked` which uses the version of the CodeQL tools
1722
that the Action has been bundled with.
1823
- A special value `nightly` which uses the latest nightly version of the

‎lib/entry-points.js‎

Lines changed: 93 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎setup-codeql/action.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ inputs:
1313
- A CodeQL CLI version number, for example `2.19.0` or `v2.19.0`, in which case the CodeQL
1414
Bundle containing that version will be downloaded, selecting the archive format and
1515
release asset that matches the runner's operating system and architecture, or
16+
- A CodeQL CLI version range, for example `2.24.x`, `2.x`, `~2.24.0`, or `^2.24.0`, in
17+
which case the most recent stable CodeQL Bundle release satisfying that range will be
18+
downloaded, or
19+
- `latest-<N>`, for example `latest-1` or `LATEST-2` (matching is case insensitive), which
20+
uses the CodeQL Bundle release `N` stable releases before the most recent one, or
1621
- A special value `linked` which uses the version of the CodeQL tools
1722
that the Action has been bundled with.
1823
- A special value `nightly` which uses the latest nightly version of the

0 commit comments

Comments
 (0)