bump version to 0.1.9 #9
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" # e.g. v0.1.3 (PyPI) | |
| - "v*.*.*-rc*" # e.g. v0.1.3-rc1 (TestPyPI) | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build sdist/wheel | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build tooling | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build | |
| - name: Build | |
| run: python -m build | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/* | |
| publish-testpypi: | |
| name: Publish to TestPyPI on -rc* tags | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write # <-- required for OIDC | |
| contents: read | |
| if: | | |
| startsWith(github.ref, 'refs/tags/v') && | |
| contains(github.ref, '-rc') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Publish (TestPyPI) | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| skip-existing: true | |
| publish-pypi: | |
| name: Publish to PyPI on final tags | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: release # Match PyPI Trusted Publisher "Environment name" while setting one | |
| permissions: | |
| id-token: write # <-- required for OIDC | |
| contents: read | |
| if: | | |
| startsWith(github.ref, 'refs/tags/v') && | |
| !contains(github.ref, '-rc') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Publish (PyPI) | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| skip-existing: true |