Skip to content

Commit

Permalink
fix: add version assertion for release (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Dec 17, 2023
1 parent 19b44d0 commit 4bc012f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ jobs:
run: |
echo "project-version=$(yq '.package.version' Cargo.toml)" >> $GITHUB_OUTPUT
- name: Assert version in release
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: |
if [[ "v${{ steps.metadata.outputs.project-version }}" != "${{ github.ref_name }}" ]]; then
echo ::error file=Cargo.toml::"Version mismatch: Cargo.toml: v${{ steps.metadata.outputs.project-version }} != ${{ github.ref_name }}"
exit 1
fi
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ members = [

[package]
name = "rattler-build"
version = "0.6.0"
version = "0.6.1"
authors = ["Wolf Vollprecht <[email protected]>"]
homepage = "https://github.com/prefix-dev/rattler-build"
edition = "2021"
Expand Down
1 change: 0 additions & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[project]
name = "rattler-build"
version = "0.3.1"
description = "Conda package builder, using the rattler rust backend"
authors = ["Wolf Vollprecht <[email protected]>"]
channels = ["conda-forge"]
Expand Down

0 comments on commit 4bc012f

Please sign in to comment.