Use $HOME instead of ~ #39
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 to PyPI | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| id-token: write # Required for PyPI Trusted Publishers | |
| contents: read | |
| jobs: | |
| publish: | |
| name: Build and publish to PyPI | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history for hatch-vcs | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build hatch hatch-vcs | |
| - name: Build package | |
| run: python -m build | |
| - name: Verify build artifacts | |
| run: | | |
| ls -lh dist/ | |
| pip install twine | |
| twine check dist/* | |
| - name: Publish to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ |