Skip to content

Add gitlab CI for checking semver is bumped. #7

Add gitlab CI for checking semver is bumped.

Add gitlab CI for checking semver is bumped. #7

Workflow file for this run

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