Skip to content

Commit

Permalink
Add version assertion for release
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Dec 17, 2023
1 parent 19b44d0 commit 5911ad6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 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.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 <w.vollprecht@gmail.com>"]
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 <w.vollprecht@gmail.com>"]
channels = ["conda-forge"]
Expand Down

0 comments on commit 5911ad6

Please sign in to comment.