v0.8.10 #12
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 | |
| # Publishes both distributions to PyPI when a GitHub Release is published: | |
| # - vgi-python (sdist + universal wheel) — the public package | |
| # - vgi-fixtures (universal wheel only) — example/test workers | |
| # | |
| # vgi-fixtures is wheel-only on purpose: its source lives at the repo root in | |
| # vgi/_test_fixtures/, which the wheel force-includes but an sdist cannot reach | |
| # (see packages/vgi-fixtures/pyproject.toml). It is a pure-python py3-none-any | |
| # wheel, so the wheel alone installs everywhere. | |
| # | |
| # Auth is PyPI Trusted Publishing (OIDC) — no API tokens. Before the first run, | |
| # configure a Trusted Publisher on PyPI for BOTH projects (vgi-python, | |
| # vgi-fixtures) pointing at: | |
| # owner: Query-farm | |
| # repository: vgi-python | |
| # workflow: release.yml | |
| # environment: pypi | |
| # The `vgi-python` and `vgi-fixtures` versions must match the released tag. | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build distributions | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.2.0 | |
| - name: Build vgi (sdist + wheel) | |
| run: uv build --sdist --wheel --out-dir dist-vgi . | |
| - name: Build vgi-fixtures (wheel only) | |
| run: uv build --wheel --out-dir dist-fixtures packages/vgi-fixtures | |
| - name: Validate metadata | |
| run: uvx twine check dist-vgi/* dist-fixtures/* | |
| - name: Upload vgi artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dist-vgi | |
| path: dist-vgi/ | |
| - name: Upload vgi-fixtures artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: dist-fixtures | |
| path: dist-fixtures/ | |
| publish-vgi: | |
| name: Publish vgi to PyPI | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| permissions: | |
| id-token: write # required for Trusted Publishing | |
| steps: | |
| - name: Download vgi artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: dist-vgi | |
| path: dist/ | |
| - name: Publish vgi | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| publish-vgi-fixtures: | |
| name: Publish vgi-fixtures to PyPI | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: pypi | |
| # Disabled until a Trusted Publisher exists for the `vgi-fixtures` | |
| # project on PyPI (blocked on a PyPI new-project limit). The wheel is | |
| # still built + metadata-checked above; only the upload is skipped, so | |
| # vgi-python releases cleanly. Re-enable (delete this `if`) once the | |
| # publisher is configured. | |
| if: false | |
| permissions: | |
| id-token: write # required for Trusted Publishing | |
| steps: | |
| - name: Download vgi-fixtures artifacts | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: dist-fixtures | |
| path: dist/ | |
| - name: Publish vgi-fixtures | |
| uses: pypa/gh-action-pypi-publish@release/v1 |