update README #78
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: Check Version Match | |
on: [push, pull_request] | |
jobs: | |
check-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: Install toml package | |
run: pip install toml | |
- name: Check version match | |
run: | | |
PYPROJECT_VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])") | |
FILE_VERSION=$(python -c "from resistify.__version__ import __version__; print(__version__)") | |
if [ "$PYPROJECT_VERSION" != "$FILE_VERSION" ]; then | |
echo "Version mismatch: pyproject.toml ($PYPROJECT_VERSION) != __version__ ($FILE_VERSION)" | |
exit 1 | |
fi | |
env: | |
PYTHONPATH: ${{ github.workspace }} |