From 6aa06ed3053c5b6554d5d308dd69821bebc85eab Mon Sep 17 00:00:00 2001 From: Test Bot Date: Wed, 18 Nov 2026 15:11:11 -0700 Subject: [PATCH] Use Open VSX trusted publishing without stored tokens Require OIDC authentication for Open VSX and remove the PAT prerequisite. Preserve manual approval and namespace verification, and document trusted publishing for both registries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/publish.yml | 9 ++------- CHANGELOG.md | 2 +- CONTRIBUTING.md | 4 +++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4f036f3..c3fba9f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -53,12 +53,9 @@ jobs: with: name: theme-vsix - run: sha256sum --check theme.vsix.sha256 - - name: Check Open VSX namespace ownership and credential + - name: Check Open VSX namespace ownership if: github.event_name == 'release' || inputs.registry != 'marketplace' - env: - OVSX_PAT: ${{ secrets.OVSX_PAT }} run: | - test -n "$OVSX_PAT" || { echo "::error::Set OVSX_PAT in the publishing environment."; exit 1; } node --input-type=module -e ' const response = await fetch("https://open-vsx.org/api/linkedinlearning"); if (!response.ok) throw new Error(`Namespace lookup failed: ${response.status}`); @@ -70,6 +67,4 @@ jobs: run: npm exec --no -- vsce publish --packagePath theme.vsix --oidc - name: Publish the same VSIX to Open VSX if: github.event_name == 'release' || inputs.registry != 'marketplace' - env: - OVSX_PAT: ${{ secrets.OVSX_PAT }} - run: npm exec --no -- ovsx publish theme.vsix + run: npm exec --no -- ovsx publish theme.vsix --trusted-publishing diff --git a/CHANGELOG.md b/CHANGELOG.md index f093546..01ba39e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Credential-free validation and VSIX packaging for pull requests and `main`. -- Approval-gated publishing to Open VSX and the VS Code Marketplace, with passwordless Marketplace authentication. +- Approval-gated publishing to Open VSX and the VS Code Marketplace, with passwordless authentication for both registries. ### Fixed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 25618c5..ee2da64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,9 @@ Publishing requires: - Required reviewers configured on the `publishing` environment. Referencing an environment in workflow YAML does not itself enforce approval. - [Marketplace Trusted Publishing](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#publish-with-github-actions-and-trusted-publishing) configured for the repository, workflow `publish.yml`, and environment `publishing`. Authentication uses OIDC rather than a stored Marketplace PAT. -- Verified ownership of the Open VSX namespace and a dedicated publishing token saved as the `OVSX_PAT` environment secret. +- Verified ownership of the Open VSX namespace and [Open VSX Trusted Publishing](https://github.com/eclipse-openvsx/openvsx/blob/master/cli/README.md#trusted-publishing) registered for the extension, repository, workflow `publish.yml`, and environment `publishing`. An extension must already be published and active before its trusted publisher can be registered. + +Both registries authenticate with short-lived OIDC credentials; no publishing token secrets are required. The Open VSX command explicitly requires trusted publishing and fails if an OIDC token cannot be obtained. ### Publishing a new version