name: Release Patch
on:
workflow_dispatch:
secrets:
CRATES_IO_TOKEN:
required: true
env:
CARGO_TERM_COLOR: always
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: fregante/setup-git-user@v1
- name: Prepare
run: |
cargo install cargo-bump
cargo install cargo-get
- name: Crates.io Login
run: |
cargo login ${{ secrets.CRATES_IO_TOKEN }}
- name: Cargo Publish
run: cargo publish
- name: Create Tag
run: |
export VERSION=$(cargo get version)
git tag -a ${VERSION} -m "Release ${VERSION}"
git push origin ${VERSION}
- name: Increment Version
run: |
cargo bump patch
export VERSION=$(cargo get version)
git add .
git commit -m "incremented patch level to ${VERSION}"
git push