Skip to content

ci: publish to the Marketplace with Entra ID instead of a PAT - #8

Merged
asbis merged 2 commits into
masterfrom
claude/marketplace-entra-publish
Sep 24, 2026
Merged

asbis merged 2 commits into
masterfrom
claude/marketplace-entra-publish

Conversation

@asbis

@asbis asbis commented Sep 24, 2026

Copy link
Copy Markdown
Owner

VSCE_PAT expired 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

  • publish job: same as before up to npm, then packages the VSIX and uploads it as an artifact instead of publishing it.
  • New marketplace job (needs: publish, environment marketplace): azure/login@v3 over GitHub OIDC, then vsce verify-pat --azure-credential and vsce publish --packagePath … --azure-credential --skip-duplicate. No secret.
  • The two jobs are separate so npm keeps working. An environment changes a job's OIDC claims, and the npm trusted publisher has to keep seeing the claims it was configured with.
  • --skip-duplicate makes Marketplace re-runs pass, the same way the npm step already skips a published version.
  • The job prints the identity the Marketplace sees on every run. It uses connectionData, not the profiles/me call in Microsoft's docs, because a service principal has no profile (VSS011031).
  • CLAUDE.md now describes Entra ID instead of the PAT.

Set up outside the repo

  • App registration "ShapeItUp Marketplace publisher (GitHub Actions)" in the Standardmappe tenant. Its federated credential trusts repo:asbis/ShapeItUp:environment:marketplace. The subject uses GitHub's default format, because the repo has use_immutable_subject: false.
  • GitHub environment marketplace with variables AZURE_CLIENT_ID and AZURE_TENANT_ID.
  • The identity fcfaa465-e0af-620c-90d9-bd9e9f89b3ab is a Contributor on the shapeitup publisher.

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_PAT is no longer used by anything.

🤖 Generated with Claude Code

asbis and others added 2 commits September 23, 2026 18:40
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>
@vercel

vercel Bot commented Sep 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
shapeitup-landing Ready Ready Preview Sep 24, 2026 9:48am UTC

@asbis
asbis merged commit 32d8237 into master Sep 24, 2026
6 checks passed

This branch was successfully deployed

2 active deployments
marketplace — 2cdc2d92 Deployed Sep 24, 2026 by asbis via marketplace #90
Preview — 2cdc2d92 Deployed Sep 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant