Skip to content

⬆ Bump version to 0.9.0 #20

⬆ Bump version to 0.9.0

⬆ Bump version to 0.9.0 #20

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
check:
uses: nalexpear/tracing-stackdriver/.github/workflows/check.yml@master
secrets: inherit
semver:
needs: check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
feature-group: all-features
publish:
needs: semver
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: ⚡ Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- name: Extract release version
run: echo -n "cargo_version=v$(cargo pkgid | cut -d '#' -f2)" >> $GITHUB_ENV
- name: Check release version
if: '${{ env.cargo_version != github.ref_name }}'
uses: actions/github-script@v3
with:
script: |
core.setFailed('Tagged version ${{ github.ref_name }} does not match Cargo version v${{ env.cargo_version }}')
- name: Publish the new version
run: cargo publish --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}