From c41940a178ad141d133977fda16438e5691dbcc2 Mon Sep 17 00:00:00 2001 From: I4cDeath Date: Tue, 13 Oct 2026 21:57:38 -0500 Subject: [PATCH] ci(release): Open VSX trusted publishing, Marketplace step optional Open VSX now publishes through GitHub OIDC (id-token: write + ovsx publish --trusted-publishing), so no OVSX_PAT secret is needed. The VS Code Marketplace step runs only when VSCE_PAT exists and is skipped with a notice otherwise, so the GitHub Release still ships. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_011g4US1AW15t9KGLvhWE2ui --- .github/workflows/release.yml | 14 ++++++++++---- README.md | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36b6d5a..74e0802 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,6 +14,7 @@ on: permissions: contents: write # create the GitHub Release + upload the .vsix + id-token: write # Open VSX trusted publishing (OIDC) concurrency: group: release-${{ github.ref }} @@ -52,16 +53,21 @@ jobs: - name: Package run: npx --yes @vscode/vsce package + # Cursor and Kiro install from Open VSX - publish the identical .vsix there. + - name: Publish to Open VSX (trusted publishing) + run: npx --yes ovsx@^1.2 publish --trusted-publishing ./*.vsix + - name: Publish to VS Code Marketplace + if: env.VSCE_PAT != '' run: npx --yes @vscode/vsce publish --packagePath ./*.vsix env: VSCE_PAT: ${{ secrets.VSCE_PAT }} - # Cursor and Kiro install from Open VSX - publish the identical .vsix there. - - name: Publish to Open VSX - run: npx --yes ovsx publish ./*.vsix + - name: Marketplace skipped + if: env.VSCE_PAT == '' + run: echo "::notice::VSCE_PAT secret not set, skipped the VS Code Marketplace publish." env: - OVSX_PAT: ${{ secrets.OVSX_PAT }} + VSCE_PAT: ${{ secrets.VSCE_PAT }} - name: Create GitHub Release with .vsix asset run: gh release create "$GITHUB_REF_NAME" ./*.vsix --generate-notes diff --git a/README.md b/README.md index 8a003a8..5f41018 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ To add a fifth variant: add a palette object, run `npm run build`, add the theme CI (`.github/workflows/ci.yml`) runs on every push and PR: regenerates the themes, fails if `themes/*.json` were hand-edited, runs the contrast audit, and does a dry-run package. -Pushing a `v*` tag (for example `git tag v2.1.0 && git push origin v2.1.0`) triggers `.github/workflows/release.yml`, which publishes the same `.vsix` to **both** the VS Code Marketplace and **Open VSX** (where Cursor and Kiro install from), and attaches it to a GitHub Release. It needs two repo secrets: `VSCE_PAT` (Azure DevOps, Marketplace Manage scope) and `OVSX_PAT` (open-vsx.org token; create the `I4cTime` namespace once with `npx ovsx create-namespace`). +Pushing a `v*` tag (for example `git tag v2.1.0 && git push origin v2.1.0`) triggers `.github/workflows/release.yml`, which publishes the same `.vsix` to **both** the VS Code Marketplace and **Open VSX** (where Cursor and Kiro install from), and attaches it to a GitHub Release. Open VSX uses trusted publishing (the workflow is registered as a trusted publisher on open-vsx.org, no token). The Marketplace step needs the `VSCE_PAT` repo secret (Azure DevOps, Marketplace Manage scope) and is skipped until it exists. ## License