add release match
-name: TestAndDeploy
+name: TestThenDeploy
on:
push:
@@ -384,6 +384,28 @@ jobs:
path: pymedphys/tests/e2e/cypress/videos
+ ValidateVersionReleaseMatch:
+ if: github.event_name == 'release' && github.event.action == 'created'
+ runs-on: ubuntu-latest
+ steps:
+ - name: Get the tag version number
+ # https://github.community/t/how-to-get-just-the-tag-name/16241/7
+ id: tag_version
+ run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\v//}
+
+ - uses: actions/checkout@v2
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.8
+ - name: Install base PyMedPhys
+ run: |
+ pip install .
+ - name: Verify that version matches
+ run: |
+ python -c "import pymedphys; assert pymedphys.__version__ == '${{ steps.tag_version.outputs.VERSION }}'"
+
+
PyPI:
# needs:
# - PreCommit
