Skip to content

Commit

Permalink
gha: add auto release
Browse files Browse the repository at this point in the history
We release upon tagging.

Signed-off-by: Peng Tao <[email protected]>
  • Loading branch information
bergwolf committed Oct 18, 2023
1 parent 47fa291 commit 467b4de
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

env:
CARGO_TERM_COLOR: always

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Publish
run: |
sudo apt-get update && sudo apt-get install --yes sed
VERSION=$(sed --regexp-extended --silent 's/^version = \"(.*)"$/\1/p' Cargo.toml)
[ "$GITHUB_REF_NAME" == "v$VERSION" ]
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true

0 comments on commit 467b4de

Please sign in to comment.