ci: don't bump every commit #31
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: CI on Main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: run cargo test | |
run: cargo test | |
release: | |
name: Publish a new release | |
# needs: | |
# test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: paulhatch/semantic-version@976ff820fcdca81ffc95e385a07b7eff05ddccc3 | |
id: get-next-version | |
with: | |
tag_prefix: "v" | |
major_pattern: "/^breaking change:/" | |
major_regexp_flags: "ig" | |
minor_pattern: "/^feat:/" | |
minor_regexp_flags: "ig" | |
version_format: "${major}.${minor}.${patch}" | |
bump_each_commit: false | |
search_commit_body: true | |
enable_prerelease_mode: true | |
- run: echo "The next version is ${{ steps.get-next-version.outputs.version }}" | |
- run: echo "The previous version is ${{ steps.get-next-version.outputs.previous_version }}" | |
- run: echo "The version tag is ${{ steps.get-next-version.outputs.version_tag }}" | |
- run: echo "The increment is ${{ steps.get-next-version.outputs.increment }}" |