From 362b32b3968264cfb723195b29dc2361b10b6013 Mon Sep 17 00:00:00 2001 From: elkaix Date: Sat, 22 Aug 2026 05:04:07 -0400 Subject: [PATCH 1/2] ci(release): publish the VS Code extension on release-PR merges --- .changeset/extension-release-on-cycle.md | 4 ++++ .github/workflows/release.yml | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/extension-release-on-cycle.md diff --git a/.changeset/extension-release-on-cycle.md b/.changeset/extension-release-on-cycle.md new file mode 100644 index 000000000..8e709b820 --- /dev/null +++ b/.changeset/extension-release-on-cycle.md @@ -0,0 +1,4 @@ +--- +"pythinker": patch +--- +Publish the extension with every release cycle. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf7599ca3..79c55a6c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -133,12 +133,15 @@ jobs: # The VS Code extension is a private workspace package: changesets bumps its # version but never publishes it to npm, so it ships from here instead. Both # publish scripts skip packages that already exist in the registry, so this - # job is a no-op on releases that did not touch the extension. + # job is a no-op on releases that did not touch the extension. Extension-only + # releases publish nothing to npm, so also run on release-PR merges. publish-vscode-extension: timeout-minutes: 45 name: Publish VS Code extension needs: release - if: needs.release.outputs.packages_published == 'true' + if: >- + needs.release.outputs.packages_published == 'true' + || startsWith(github.event.head_commit.message, 'ci: release packages') runs-on: ubuntu-latest steps: - name: Checkout From 07245bcda062b9f809de2fc9daa140b404e109df Mon Sep 17 00:00:00 2001 From: elkaix Date: Sat, 22 Aug 2026 05:15:55 -0400 Subject: [PATCH 2/2] ci(release): gate the extension publish on a version-bump signal --- .github/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 79c55a6c2..cf9f2dc83 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,6 +53,7 @@ jobs: if: github.repository_owner == 'PyModel' outputs: packages_published: ${{ steps.changesets.outputs.published }} + extension_version_bumped: ${{ steps.extension-version.outputs.bumped }} pythinker_native_release: ${{ steps.pythinker-release.outputs.should_publish }} pythinker_release_tag: ${{ steps.pythinker-release.outputs.tag }} permissions: @@ -78,6 +79,18 @@ jobs: - name: Upgrade npm for Trusted Publishing run: npm install -g npm@11 + # Machine-readable signal for the VS Code extension publish gate: the + # release PR merge is a squash whose only meaningful delta for the + # extension is the version field, so compare it against the previous + # commit instead of trusting the commit-message prefix. + - name: Detect extension version bump + id: extension-version + run: | + prev=$(git show 'HEAD^:apps/vscode/package.json' | node -p 'JSON.parse(require("fs").readFileSync(0, "utf8")).version') + curr=$(node -p 'require("./apps/vscode/package.json").version') + if [ "$prev" = "$curr" ]; then bumped=false; else bumped=true; fi + echo "bumped=$bumped" >> "$GITHUB_OUTPUT" + - name: Install dependencies run: pnpm install --frozen-lockfile @@ -134,15 +147,17 @@ jobs: # version but never publishes it to npm, so it ships from here instead. Both # publish scripts skip packages that already exist in the registry, so this # job is a no-op on releases that did not touch the extension. Extension-only - # releases publish nothing to npm, so also run on release-PR merges. + # releases publish nothing to npm, so the gate also covers a version bump. publish-vscode-extension: timeout-minutes: 45 name: Publish VS Code extension needs: release if: >- needs.release.outputs.packages_published == 'true' - || startsWith(github.event.head_commit.message, 'ci: release packages') + || needs.release.outputs.extension_version_bumped == 'true' runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pinned from v6.0.2