Skip to content

Commit 083530b

Browse files
feloyclaude
andauthored
fix(ci): set version from tag before building release binaries (#9)
Cargo embeds the version string from Cargo.toml at compile time. The build job was not updating Cargo.toml before building, so all release binaries shipped with the -next suffix from the dev version. Installs cargo-edit and calls `cargo set-version` with the tag version (stripping the leading `v`) before the build steps run. Signed-off-by: Philippe Martin <phmartin@redhat.com> Co-authored-by: Claude Code (claude-sonnet-4-6) <noreply@anthropic.com>
1 parent 4a3ef63 commit 083530b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ jobs:
3131
toolchain: stable
3232
targets: ${{ matrix.target }}
3333

34+
- name: Install cargo-edit
35+
run: cargo install cargo-edit --locked
36+
37+
- name: Set version from tag
38+
run: |
39+
VERSION="${{ github.ref_name }}"
40+
cargo set-version "${VERSION#v}"
41+
3442
- name: Install cross
3543
if: matrix.use_cross == true
3644
run: cargo install cross --locked

0 commit comments

Comments
 (0)