You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Publish the VS Code extension with trusted publishing, then remove the registry tokens #589
The VS Code extension is published by .github/workflows/vscode--citry--publish.yml with two long-lived access tokens stored as repository secrets: OVSX_PAT for Open VSX and VSCE_PAT for the Visual Studio Marketplace. Both registries now let a GitHub Actions workflow publish with a short-lived token from GitHub's OIDC sign-in instead, so no token needs to be stored.
On open-vsx.org, in the user settings, add a trusted publisher for the citry-dev namespace that names this repository and vscode--citry--publish.yml.
In the promote job, add id-token: write to the permissions and publish with ovsx publish --trusted-publishing --skip-duplicate. The flag makes the command fail when no ID token is available, so it cannot fall back to a token silently.
Drop the OVSX_PAT check from "Require registry credentials and read GitHub Release state".
After a release publishes this way, delete the OVSX_PAT repository secret and revoke the Citry access token on open-vsx.org.
Visual Studio Marketplace
The Marketplace offers the same thing (publishing docs, announcement). On the citry-dev publisher page, a trusted publishing policy names the repository and workflow. The workflow then runs vsce publish --oidc, and the Marketplace issues a credential that lasts 15 minutes. Each GitHub OIDC token can be exchanged only once.
Add the policy on the Marketplace publisher page.
Switch the publish step to vsce publish --oidc --packagePath ... --skip-duplicate, and check that the locked @vscode/vsce version supports --oidc.
Drop the VSCE_PAT check.
After a release publishes this way, delete the VSCE_PAT secret and revoke the Azure DevOps token.
The older route, Entra ID workload identity with vsce publish --azure-credential, needs an Azure managed identity added to the publisher. Use it only if --oidc doesn't work for this publisher.
Note on the verify step
Open VSX now reviews a new version before serving it. For 0.3.0 that took longer than the verify step's five minutes (20 tries, 15 seconds apart), so the step failed after both uploads had succeeded, and the job was re-run by hand. While editing this workflow, give the Open VSX check a longer wait, or report a version that is still under review separately from one that is missing.
Activity