release(workspace): bump v0.0.1a16.dev3 → v0.0.1a16.dev4 #27
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*" | |
| permissions: | |
| contents: read | |
| id-token: write | |
| attestations: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python 3.14 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Resolve release metadata | |
| id: release | |
| run: | | |
| python - <<'PY' "${GITHUB_REF_NAME}" >> "${GITHUB_OUTPUT}" | |
| import json | |
| import pathlib | |
| import sys | |
| sys.path.insert(0, str(pathlib.Path("scripts/ci").resolve())) | |
| import package_tools | |
| metadata = package_tools.release_metadata(sys.argv[1]) | |
| for key, value in metadata.items(): | |
| print(f"{key}={value}") | |
| PY | |
| # `gp-furo-theme`'s build backend (`sphinx_vite_builder.build`) | |
| # runs `pnpm exec vite build` during sdist + wheel construction. | |
| # Without pnpm + Node the backend fast-fails with PnpmMissingError | |
| # and the release pipeline aborts before publish — exactly the | |
| # invariant we want, but it requires the toolchain to be set up | |
| # first. The backend short-circuits cleanly inside the unpacked | |
| # sdist (no `web/` → assume pre-baked) so end users `pip install` | |
| # without pnpm/Node. | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v6 | |
| with: | |
| version: 10 | |
| - name: Set up Node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install workspace dependencies | |
| run: uv sync --all-packages --all-extras --group dev | |
| - name: Validate lockstep versions | |
| run: uv run python scripts/ci/package_tools.py check-versions | |
| - name: Build publishable packages | |
| run: | | |
| rm -rf dist | |
| mkdir -p dist | |
| while IFS= read -r package; do | |
| uv build --package "$package" --out-dir dist | |
| done < <(uv run python scripts/ci/package_tools.py print-packages) | |
| - name: Validate distributions with twine | |
| run: uvx twine check dist/* | |
| - name: Smoke test publishable packages | |
| run: | | |
| while IFS= read -r package; do | |
| uv run python scripts/ci/package_tools.py smoke "$package" --dist-dir dist | |
| done < <(uv run python scripts/ci/package_tools.py print-packages) | |
| - name: Publish packages | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| attestations: true | |
| packages-dir: dist/ | |
| skip-existing: true |