docs: prepare for v1.0.0 - changelog fixups #4
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*.*.*' # Triggers on version tags like v0.1.0, v1.2.3, etc. | |
| 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 # Fetch all history for hatch-vcs versioning | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install hatch | |
| run: pip install hatch | |
| - name: Run Ruff linter | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: check . | |
| - name: Run tests | |
| run: hatch run test | |
| publish: | |
| needs: test # Only publish if tests pass | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/caldav-server-tester | |
| permissions: | |
| id-token: write # Required for trusted publishing | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Fetch all history for hatch-vcs versioning | |
| - 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/ |