Skip to content

add release workflow and support for binstall for sqlx cli#4181

Open
bnjjj wants to merge 1 commit intolaunchbadge:mainfrom
bnjjj:bnjjj/fix_1201
Open

add release workflow and support for binstall for sqlx cli#4181
bnjjj wants to merge 1 commit intolaunchbadge:mainfrom
bnjjj:bnjjj/fix_1201

Conversation

@bnjjj
Copy link

@bnjjj bnjjj commented Mar 4, 2026

Add cargo-binstall support for sqlx-cli

The motivation behind this PR is to avoid in every CI builds to re-compile the sqlx cli and wait for 6' for every builds.

This PR will allow users to install sqlx-cli pre-built binaries via cargo binstall sqlx-cli instead of compiling from source.

Changes

sqlx-cli/Cargo.toml — adds [package.metadata.binstall] metadata:

  • Defines the release asset URL template pointing to GitHub releases
  • Sets .tgz as the default archive format, with a .zip override for Windows
  • Maps both sqlx and cargo-sqlx binaries to the archive root

.github/workflows/release.yml — new workflow triggered on version tags (v*..):

  • Builds sqlx and cargo-sqlx for all four supported targets (x86_64-unknown-linux-musl, x86_64-pc-windows-msvc, x86_64-apple-darwin, aarch64-apple-darwin)
  • Packages each target into a sqlx-cli-v{version}-{target}.tgz / .zip archive containing both binaries
  • Creates a GitHub release with auto-generated notes and all archives attached

Usage

Once a release tag is pushed:

  cargo binstall sqlx-cli

Does your PR solve an issue?

fixes #1201

Is this a breaking change?

No

Signed-off-by: Benjamin <5719034+bnjjj@users.noreply.github.com>
@eirnym
Copy link

eirnym commented Mar 7, 2026

I would prefer if taiki-e/upload-rust-binary-action (without upload part) to be used, as phantom target universal-apple-darwin could be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sqlx-cli: provide generic Linux binaries for CI

2 participants