Skip to content

Commit

Permalink
Add release CI
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed May 30, 2024
1 parent 45eecbf commit 02bbf02
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release
on:
push:
tags:
- v*
jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check version
run: |
TAG_VERSION=$(echo ${GITHUB_REF#refs/tags/v})
CRATE_VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
test "$TAG_VERSION" = "$CRATE_VERSION"
publish:
runs-on: ubuntu-latest
needs: check-version
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Publish
run: cargo publish

0 comments on commit 02bbf02

Please sign in to comment.