Adding cargo semver checks #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: semver-checks | |
on: [push, pull_request] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
check_if_pr_breaks_semver: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write # needed for adding label | |
steps: | |
- uses: actions/checkout@v4 | |
name: checkout full rep | |
with: | |
fetch-depth: 0 | |
- name: Install minimal stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: default | |
toolchain: stable | |
override: true | |
- uses: Swatinem/rust-cache@v2 | |
- name: Install cargo-semver-checks | |
shell: bash | |
run: | | |
cargo install cargo-semver-checks --locked | |
- name: Run check | |
shell: bash | |
run: | | |
cargo semver-checks --all-features --baseline-rev ${{ github.event.pull_request.base.sha }} | |
- name: On Success | |
if: success() | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: breaking-change | |
- name: On Failure | |
if: failure() | |
uses: actions-ecosystem/action-add-labels@v1 | |
with: | |
labels: breaking-change |