Repository navigation
ci: publish to the Marketplace with Entra ID instead of a PAT - #8
Merged
Merged
Conversation
VSCE_PAT expired in August and the Marketplace listing sat at 1.23.0 through six releases, because the failure only ever hit the last step, after npm had published. Azure DevOps also retires global PATs on 2026-12-01, so a renewed token only buys two months. The Marketplace upload moves to its own job in the `marketplace` environment, signs in with azure/login over GitHub OIDC, and publishes the VSIX the first job packaged with `vsce publish --azure-credential`. The separate job keeps the npm trusted publisher's OIDC claims unchanged. It checks publish rights before uploading, and --skip-duplicate makes a re-run pass the same way the npm step's skip does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A service principal has no Azure DevOps profile, so profiles/me answers VSS011031. connectionData returns the same ID for any signed-in identity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
1 of 5 tasks
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
VSCE_PATexpired in August. The failure only ever hit the last step, after npm had already published, so the Marketplace listing sat at 1.23.0 through six releases (1.24.0 → 1.29.5) without anything looking broken. Azure DevOps also retires global PATs on 2026-12-01, so the token renewed yesterday only lasts two months.What changes
publishjob: same as before up to npm, then packages the VSIX and uploads it as an artifact instead of publishing it.marketplacejob (needs: publish, environmentmarketplace):azure/login@v3over GitHub OIDC, thenvsce verify-pat --azure-credentialandvsce publish --packagePath … --azure-credential --skip-duplicate. No secret.--skip-duplicatemakes Marketplace re-runs pass, the same way the npm step already skips a published version.connectionData, not theprofiles/mecall in Microsoft's docs, because a service principal has no profile (VSS011031).Set up outside the repo
repo:asbis/ShapeItUp:environment:marketplace. The subject uses GitHub's default format, because the repo hasuse_immutable_subject: false.marketplacewith variablesAZURE_CLIENT_IDandAZURE_TENANT_ID.fcfaa465-e0af-620c-90d9-bd9e9f89b3abis a Contributor on theshapeituppublisher.Verified
Dispatched from this branch, run 35983134243:
publish✅ (npm skipped 1.29.5)marketplace✅: "verification succeeded for the publisher 'shapeitup'", then "Version 1.29.5 is already published. Skipping publish."The first dispatch, before the identity was added to the publisher, failed at the rights check as expected.
VSCE_PATis no longer used by anything.🤖 Generated with Claude Code