New pipelines #3
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: Check version bump | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
check: | |
name: Check version bump | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Rust toolchain stable-x86_64-unknown-linux-gnu for ubuntu-latest | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable-x86_64-unknown-linux-gnu | |
override: true | |
- name: Read branch version | |
id: branch_version | |
run: echo "::set-output name=version::$(cargo read-manifest | jq -r .version)" | |
- name: Checkout main | |
uses: actions/checkout@v2 | |
with: | |
ref: main | |
- name: Read main version | |
id: main_version | |
run: echo "::set-output name=version::$(cargo read-manifest | jq -r .version)" | |
- name: Check version bump | |
run: | | |
if [ "${{ steps.branch_version.outputs.version }}" == "${{ steps.main_version.outputs.version }}" ]; then | |
echo "Detected missing version bump" | |
exit 1 | |
else | |
echo "Detected version bump" | |
fi |