add _version.py to git ignore #23
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: PyPI | |
on: | |
push: | |
branches: | |
- "**" | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
pull_request: | |
env: | |
PUBLISH_TO_PYPI: true | |
SETUOTOOLS_SCM_DEBUG: 1 | |
jobs: | |
pypi: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- uses: actions/setup-python@v5 | |
with: | |
python-version-file: .python-version | |
- name: Install Dependencies | |
run: make install | |
- name: Build Wheel | |
run: make build | |
# This will only run on Tags | |
- name: Publish package | |
if: ${{ env.PUBLISH_TO_PYPI == 'true' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')}} | |
uses: pypa/gh-action-pypi-publish@release/v1 |