Systrack v0.4 #15
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: Publish to PyPI | |
on: | |
release: | |
types: | |
- published | |
# Allow only one concurrent job | |
concurrency: | |
group: publish | |
cancel-in-progress: false | |
jobs: | |
test-before-publish: | |
uses: ./.github/workflows/test.yml | |
publish: | |
needs: [test-before-publish] | |
runs-on: ubuntu-latest | |
environment: | |
name: hatch | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Ensure matching version and release tag | |
run: test v"$(python3 src/systrack/version.py)" = "${{github.ref_name}}" | |
- name: Install build dependencies | |
run: python3 -m pip install --upgrade build hatch | |
- name: Build wheel and sdist | |
run: hatch build | |
- name: Publish to PyPI | |
run: hatch publish --no-prompt | |
env: | |
HATCH_INDEX_USER: __token__ | |
HATCH_INDEX_AUTH: ${{secrets.HATCH_INDEX_AUTH}} |