Repository navigation
Conversation
…- W-24666922 openvsx-publish-release-vsix.yml and vscode-promote-prerelease.yml both ran `ovsx publish` against a PAT (-p $OVSX_PAT / $IDEE_OVSX_PAT). Switches both to `ovsx publish --trusted-publishing`, which exchanges this job's GitHub Actions OIDC ID token for a short-lived publish token instead -- requires `id-token: write`, which both workflows now grant. Open VSX's trusted-publisher config binds one identity per extension to the exact workflow file that requests the OIDC token (its job_workflow_ref). vscode-promote-prerelease.yml's `ovsx` leg previously ran its own `ovsx publish` inline, inside the same matrix job as `vsce` -- a different file from openvsx-publish-release-vsix.yml, which the stable release path uses. That would mean two different job_workflow_ref values for the same extension's Open VSX publishes, which a single trusted-publisher entry can't match. Split the `ovsx` leg out of that matrix job (GitHub Actions won't let a `uses:`-based job share a matrix with per-leg different targets) into its own `publish-ovsx` job that delegates to openvsx-publish-release-vsix.yml via `uses:`, instead of duplicating the ovsx-publish logic. Every Open VSX publish for a given extension -- stable, stable hotfix, prerelease, prerelease/emergency hotfix -- now requests its OIDC token from that one file. openvsx-publish-release-vsix.yml gained `vsix-name-pattern` and `exclude-web-vsix` inputs (both optional, default-compatible) so the delegated call can reproduce vscode-promote-prerelease.yml's existing filtering for monorepo/multi-extension callers. vsce/Marketplace publishing (VSCE_PERSONAL_ACCESS_TOKEN) is untouched.
|
Closing in favor of a narrower approach. Turns out Open VSX's trusted-publisher matching checks the OIDC token's The real fix has to make both channels share one top-level workflow file in salesforcedx-vscode itself. A replacement PR will follow carrying forward just the openvsx-publish-release-vsix.yml PAT -> --trusted-publishing migration (still needed, since the new salesforcedx-vscode-side workflow will delegate to it) -- dropping this PR's vscode-promote-prerelease.yml job-split, which is no longer needed. |
Summary
openvsx-publish-release-vsix.ymlandvscode-promote-prerelease.ymlboth ranovsx publishagainst a PAT (-p $OVSX_PAT/$IDEE_OVSX_PAT). Both now useovsx publish --trusted-publishing, which exchanges this job's GitHub Actions OIDC ID token for a short-lived publish token instead — requiresid-token: write, which both workflows now grant.job_workflow_ref).vscode-promote-prerelease.yml'sovsxleg previously ran its ownovsx publishinline, in the same matrix job asvsce— a different file fromopenvsx-publish-release-vsix.yml, which the stable release path uses. That meant two differentjob_workflow_refvalues for the same extension's Open VSX publishes, which a single trusted-publisher entry can't match.ovsxleg out of that matrix job (auses:-based job can't share a matrix with per-leg different targets) into its ownpublish-ovsxjob that delegates toopenvsx-publish-release-vsix.ymlviauses:, instead of duplicating the publish logic. Every Open VSX publish for a given extension — stable, stable hotfix, prerelease, prerelease/emergency hotfix — now requests its OIDC token from that one file.openvsx-publish-release-vsix.ymlgained optionalvsix-name-pattern/exclude-web-vsixinputs (default-compatible) so the delegated call can reproducevscode-promote-prerelease.yml's existing filtering for monorepo/multi-extension callers (e.g.salesforcedx-vscode'ssalesforcedx-vscode-*.vsixpattern).vsce/Marketplace publishing (VSCE_PERSONAL_ACCESS_TOKEN) is untouched.Validation
actionlinton both files: zero new findings vs.main(pre-existing shellcheck notices only).forcedotcom/salesforcedx-vscode(publishOpenVSX.yml,promote-to-prerelease.yml): neither needs any change, since the new inputs default to current behavior and the renamed/split job (publish→publish-vsce/publish-ovsx) is internal to this reusable workflow.Test plan
openvsx-publish-release-vsix.ymlvscode-promote-prerelease.ymlfrom a consumer and confirmpublish-ovsxresolves correctly andtag-promotedstill gates on bothpublish-vsceandpublish-ovsxovsx publish --trusted-publishingsucceeds withoutIDEE_OVSX_PAT@W-24666922@