Bump version to 0.1.3 #5
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: Release (TestPyPI only) | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| id-token: none | |
| packages: write | |
| jobs: | |
| build: | |
| name: Build distributions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install build tooling | |
| run: | | |
| python -m pip install -U pip build twine | |
| - name: Build sdist/wheel | |
| run: | | |
| python -m build | |
| python -m twine check dist/* | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/* | |
| publish-testpypi: | |
| name: Publish to TestPyPI | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| if: contains(github.ref_name, '-') | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Publish to TestPyPI | |
| uses: pypa/[email protected] | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| username: __token__ | |
| password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
| verbose: true | |
| publish-pypi: | |
| name: Publish to PyPI | |
| needs: [build] | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.ref_name, '-') }} | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Publish to PyPI | |
| uses: pypa/[email protected] | |
| with: | |
| username: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| verbose: true | |
| github-release-test: | |
| name: Create GitHub Release (TestPyPI) | |
| needs: [publish-testpypi] | |
| runs-on: ubuntu-latest | |
| if: contains(github.ref_name, '-') && needs.publish-testpypi.result == 'success' | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| body: | | |
| Automated prerelease for ${{ github.ref_name }}. | |
| draft: false | |
| prerelease: true | |
| files: | | |
| dist/*.whl | |
| dist/*.tar.gz | |
| github-release-pypi: | |
| name: Create GitHub Release (PyPI) | |
| needs: [publish-pypi] | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(github.ref_name, '-') }} && needs.publish-pypi.result == 'success' | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| body: | | |
| Automated release for ${{ github.ref_name }}. | |
| draft: false | |
| prerelease: false | |
| files: | | |
| dist/*.whl | |
| dist/*.tar.gz |