Skip to content

Staging

Staging #13

Workflow file for this run

name: version-check
on:
pull_request:
branches:
- main
jobs:
version-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Retrieve version from __version__.py
run: |
VERSION=$(awk -F"'" '/__version__/{print $2}' sequence/__version__.py)
- name: Retrieve version from CHANGELOG.md
run: |
CHANGELOG_VERSION=$(awk 'match($0, /\[[0-9]+\.[0-9]+\.[0-9]+\]/) {print substr($0, RSTART+1, RLENGTH-2); exit}' CHANGELOG.md)
- name: Compare the two version
run: |
if [ "$VERSION" != "$CHANGELOG_VERSION" ]; then
echo "The project version doesn't match the one of the CHANGELOG"
exit 1
fi
echo "The project version and the CHANGELOG version match"