Skip to content

Commit

Permalink
Merge pull request #20 from moia-oss/check-semver-on-pr
Browse files Browse the repository at this point in the history
Check semver of PR
  • Loading branch information
rinde authored Mar 6, 2023
2 parents a33e0e0 + 88c769c commit 1600dfc
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,30 @@ jobs:
shared-key: debug-build-nightly
- name: Make lint
run: make lint
semver:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Calculate next version
id: calc_version
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: patch
tag_prefix: ""
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set version
if: ${{ steps.calc_version.outputs.version }} != ""
run: |
sed -i "s/^version = \".*\"$/version = \"${{ steps.calc_version.outputs.version }}\"/" Cargo.toml
- name: Commit new version to main but don't push
if: ${{ steps.calc_version.outputs.version }} != ""
run: |
git config --global user.email "[email protected]"
git config --global user.name "MOIA Rust Maintainers"
git commit -am "Phantom release ${{ steps.calc_version.outputs.version }} [skip ci]"
- name: Check semver
uses: obi1kenobi/cargo-semver-checks-action@v1
with:
version-tag-prefix: ''

0 comments on commit 1600dfc

Please sign in to comment.