Workflow file for this run
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: Validate Version bump upon release | |
on: | |
release: | |
types: [created] | |
jobs: | |
validate-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Validate version in setup.py | |
run: | | |
VERSION=$(python setup.py --version) | |
echo "Version in setup.py: $VERSION" | |
if [[ "v$VERSION" != "$GITHUB_REF_NAME" ]]; then | |
echo "Version mismatch: setup.py (v$VERSION) vs release tag ($GITHUB_REF_NAME)" | |
exit 1 | |
fi |