fix: Use filename-based GitHub Actions badge URL (#2) #3
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 and PyPI Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| concurrency: release | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Python Semantic Release | |
| id: release | |
| uses: python-semantic-release/python-semantic-release@v9.15.2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build package | |
| if: steps.release.outputs.released == 'true' | |
| run: uv build | |
| - name: Publish to PyPI | |
| if: steps.release.outputs.released == 'true' | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| - name: Publish to GitHub Releases | |
| if: steps.release.outputs.released == 'true' | |
| uses: python-semantic-release/publish-action@v9.15.2 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |