docs: prepare changelog for 1.0.6-release #24
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*.*.*' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for hatch-vcs to determine version from git tags | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: pip install -e ".[dev]" | |
| - name: Run Ruff linter | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: check . | |
| - name: Run tests | |
| run: pytest | |
| publish: | |
| needs: test # Only publish if tests pass | |
| runs-on: ubuntu-latest | |
| environment: main # Uses the "main" environment for deployment protection | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for hatch-vcs to determine version from git tags | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install build tools | |
| run: pip install build | |
| - name: Verify version from git tags | |
| run: | | |
| git describe --tags --long | |
| echo "Git tag detected above ^" | |
| - name: Build package | |
| run: python -m build --sdist --wheel | |
| - name: Display built packages | |
| run: | | |
| ls -lh dist/ | |
| echo "Verifying version in wheel metadata:" | |
| unzip -p dist/*.whl */METADATA | grep "^Version:" | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| verbose: true | |
| # Uses PyPI Trusted Publishers (no token needed if configured) | |
| # See: https://docs.pypi.org/trusted-publishers/ |