Skip to content

feat(vscode): add OIDC-compatible publish-release-vsix composite action - W-24756661 - #207

Merged
madhur310 merged 1 commit into
mainfrom
ms/W-24756661-vsce-oidc-composite-action
Nov 12, 2026
Merged

madhur310 merged 1 commit into
mainfrom
ms/W-24756661-vsce-oidc-composite-action

Conversation

@madhur310

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/actions/vscode/publish-release-vsix as an OIDC-safe alternative to vscode-publish-release-vsix.yml for publishing to the VS Code Marketplace.
  • vscode-publish-release-vsix.yml is a job-level reusable workflow. Live-tested in forcedotcom/salesforcedx-vscode (see publishVSCodeMarketplaceTrusted.yml): every vsce publish --oidc call made from inside that nested workflow got a 401 Unauthorized ("The token could not be exchanged for the specified publisher"), even with a Trusted Publishing policy registered for the caller's own repo + workflow filename. The Marketplace's OIDC trust check appears to key off the token's job_workflow_ref claim, which for a nested reusable workflow always points at this repo, not the caller's.
  • A composite action runs as a step inside the caller's own job instead of as a separate job, so job_workflow_ref stays pointed at the caller. A follow-up live test using this same inlined shape against real Marketplace OIDC published all 17 extensions successfully with zero 401s.
  • Supersedes feat(release): add OIDC trusted-publishing support to vscode-publish-release-vsix.yml - W-24756661 #203, which added --oidc to the reusable workflow itself -- that approach can't work regardless of what changes inside the workflow, since the mismatch happens at the uses: job-delegation boundary before any of that code runs.

Test plan

  • Live-tested the inlined shape against the real Marketplace OIDC endpoint from forcedotcom/salesforcedx-vscode (dry-run + real publish with --skip-duplicate against an already-published nightly tag) -- succeeded with no 401s.
  • Wire this action into forcedotcom/salesforcedx-vscode's real publishVSCode.yml (currently still PAT-based via vscode-publish-release-vsix.yml@main) once reviewed.

🤖 Generated with Claude Code

madhur310 added a commit to forcedotcom/salesforcedx-vscode that referenced this pull request Nov 10, 2026
… W-24756661

The inlined download+publish+retry logic validated here has been extracted
to salesforcecli/github-workflows's vscode/publish-release-vsix composite
action (salesforcecli/github-workflows#207), since it runs as a step inside
the caller's own job (keeping job_workflow_ref pointed at this repo) rather
than as a separate job in a nested reusable workflow. Switches this test
workflow to call that action, pinned to its PR branch until #207 merges, so
the extracted shape gets the same end-to-end validation before anything
real depends on it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@madhur310
madhur310 marked this pull request as ready for review November 10, 2026 21:53
@madhur310
madhur310 requested a review from a team as a code owner November 10, 2026 21:53
…on - W-24756661

vscode-publish-release-vsix.yml is a job-level reusable workflow, so vsce
publish --oidc inside it always exchanges against job_workflow_ref pointing
at this repo rather than the caller's -- confirmed via a live test in
forcedotcom/salesforcedx-vscode, where every --oidc attempt through that
nested workflow got a 401 ("token could not be exchanged for the specified
publisher") despite a Trusted Publishing policy registered for the caller's
own repo + workflow filename. A composite action runs as a step inside the
caller's own job instead, so job_workflow_ref matches what's registered.
Adds vscode/publish-release-vsix as the OIDC-safe equivalent of the existing
PAT-based reusable workflow, following the same pattern as the already
inline-called vscode/publish-vsix action.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@madhur310
madhur310 force-pushed the ms/W-24756661-vsce-oidc-composite-action branch from bc81f99 to 3584eaf Compare November 12, 2026 19:42
@madhur310
madhur310 merged commit f145cdc into main Nov 12, 2026
2 checks passed
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.

2 participants