Add gitlab CI for checking semver is bumped. #7
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-semver | |
on: | |
pull_request: | |
push: | |
branches: [main, dev] | |
jobs: | |
check-semver: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check diff | |
run: | | |
git fetch | |
SEMVER_CHANGED=$(git diff origin/$GITHUB_BASE_REF...HEAD setup.py | grep "version=") | |
if [ -z "$SEMVER_CHANGED" ]; then exit 1; else exit 0; fi |