Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/upload-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -euo pipefail
usage() {
echo "Usage: $0 [--publish] <repository> <version>"
echo "Examples:"
echo " $0 informalsystems/quint v0.22.2"
echo " $0 --publish informalsystems/quint v0.22.2"
echo " $0 quint-co/quint v0.22.2"
echo " $0 --publish quint-co/quint v0.22.2"
exit 1
}

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release-quint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,16 @@ jobs:
working-directory: ./quint
permissions:
contents: write
# Required for npm trusted publishing (OIDC) and provenance
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: "18"
# npm trusted publishing requires npm >= 11.5.1, shipped with node 24
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Compile
run: npm ci
Expand All @@ -40,7 +43,7 @@ jobs:
sed -n "/## v$version/,/## v/p" ../CHANGELOG.md | head -n -1 > ${{ github.workspace }}/release-notes.txt
- name: Release
# See https://github.com/softprops/action-gh-release#-external-release-notes
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body_path: ${{ github.workspace }}/release-notes.txt
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
15 changes: 8 additions & 7 deletions quint/src/rust/binaryManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,15 @@ class GitHubClient {
}

async fetchRelease(version: string): Promise<GitHubRelease> {
const url = `https://api.github.com/repos/informalsystems/quint/releases`
const response = await this.fetch(url, 'application/vnd.github.v3+json')
const releases = (await response.json()) as GitHubRelease[]
const release = releases.find(release => release.tag_name === `evaluator/${version}`)
if (!release) {
throw new Error(`Release ${version} not found`)
// Fetch the release by tag directly, instead of listing releases, which is
// paginated and would eventually stop including older evaluator releases.
const url = `https://api.github.com/repos/quint-co/quint/releases/tags/evaluator/${version}`
try {
const response = await this.fetch(url, 'application/vnd.github.v3+json')
return (await response.json()) as GitHubRelease
} catch (err) {
throw new Error(`Release ${version} not found: ${err}`)
}
return release
}

async downloadAsset(asset: GitHubAsset, path: string): Promise<string> {
Expand Down
Loading