fix: Make README.md render nicely on PyPI #2
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 | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Ensure tag matches project version | |
| if: github.ref_type == 'tag' | |
| env: | |
| TAG_NAME: ${{ github.ref_name }} | |
| run: python scripts/check_tag_version.py | |
| - name: Install build tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install build twine | |
| - name: Build package distributions | |
| run: python -m build | |
| - name: Check package metadata | |
| run: twine check dist/* | |
| - name: Create GitHub release | |
| if: github.ref_type == 'tag' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| generate_release_notes: true | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |