Skip to content

Commit

Permalink
Update release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmielchen authored Jan 29, 2024
1 parent 3b6ab9b commit 2473a01
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,24 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
RELEASE_VERSION=${GITHUB_REF#refs/tags/}
CARGO_VERSION=$(awk -F' = ' '$1=="version"{print $2; exit}' Cargo.toml | tr -d '"')
if [ "$RELEASE_VERSION" != "$CARGO_VERSION" ]; then
echo "Release version ($RELEASE_VERSION) does not match Cargo.toml version ($CARGO_VERSION)"
exit 1
fi
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: publish
args: --dry-run
- uses: actions-rs/cargo@v1
with:
command: login
args: --token ${{ secrets.CRATES_API_TOKEN }}
- uses: actions-rs/cargo@v1
with:
command: publish

0 comments on commit 2473a01

Please sign in to comment.