From 8b7f5568f8af733f1967b917ba168d8951a59c6b Mon Sep 17 00:00:00 2001 From: Yigtwxx Date: Wed, 30 Sep 2026 11:55:40 +0300 Subject: [PATCH] chore(ci): move the actions to Node 24 and test the artifact hand-off GitHub now warns that Node 20 actions are deprecated. checkout goes to v7, upload-artifact to v7, download-artifact to v8, and setup-uv to v10.2.0. setup-uv is pinned by commit because it no longer publishes major tags. The release build turns its cache off explicitly, since what it builds goes to PyPI. A new package + package-roundtrip pair runs uv build, uploads the result and downloads it again on every change. That way a broken hand-off fails in CI rather than in the middle of a release. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_019tqixmvHDK9mB8Rg2X5qCs --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++---- .github/workflows/release.yml | 19 +++++++++++------- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31eb090..d3b5fe5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v5 + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 with: enable-cache: true - run: uv sync --extra dev @@ -32,10 +32,39 @@ jobs: python-version: ["3.10", "3.13"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v5 + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 with: enable-cache: true python-version: ${{ matrix.python-version }} - run: uv sync --extra dev - run: uv run pytest + + package: + # The release workflow hands its wheel and sdist from one job to the next as an + # artifact, and nothing exercises that path until a tag is pushed. This job + # does the same round trip on every change, so a broken build or an artifact + # action that unpacks somewhere else (dist/dist/) fails here, not mid-release. + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 + with: + enable-cache: false + - run: uv build + - uses: actions/upload-artifact@v7 + with: + name: dist-check + path: dist/ + retention-days: 1 + + package-roundtrip: + needs: package + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v8 + with: + name: dist-check + path: dist/ + - name: The wheel and the sdist land directly in dist/ + run: ls dist/*.whl dist/*.tar.gz diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2a5827..616f8ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,17 +12,22 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v5 + - uses: actions/checkout@v7 + # No cache here: what this job builds goes to PyPI, so it starts from nothing + # rather than from a cache another run could have written (cache poisoning). + # setup-uv v10's `auto` default already skips the cache on a tag push; this + # says so explicitly, so a later default change cannot turn it back on. + # setup-uv publishes no major tag since v8, hence the pinned commit. + - uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 with: - enable-cache: true + enable-cache: false # A tag whose version has no CHANGELOG section stops here, before PyPI: a # release is not re-publishable, its notes must exist first. - name: The CHANGELOG has this version's section if: startsWith(github.ref, 'refs/tags/v') run: python3 scripts/release_notes.py "${GITHUB_REF_NAME#v}" > /dev/null - run: uv build - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v7 with: name: dist path: dist/ @@ -34,7 +39,7 @@ jobs: permissions: id-token: write # required for Trusted Publishing steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: dist path: dist/ @@ -47,8 +52,8 @@ jobs: permissions: contents: write # to create the release steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v7 + - uses: actions/download-artifact@v8 with: name: dist path: dist/