Skip to content

Fix publish workflow auth by supporting VSCE_PAT with backward-compatible fallback#587

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-github-actions-workflow-publish
Draft

Fix publish workflow auth by supporting VSCE_PAT with backward-compatible fallback#587
Copilot wants to merge 2 commits intomainfrom
copilot/fix-github-actions-workflow-publish

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 17, 2026

Release and publish extension started failing at the Marketplace publish step with 401 Unauthorized. The failure was caused by strict dependency on a single secret name for the VS Marketplace PAT.

  • Root cause

    • Publish job only read secrets.PUBLISHER_KEY for HaaLeo/publish-vscode-extension.
    • If the environment is configured with VSCE_PAT (common naming), the action receives no valid token and returns 401.
  • Workflow change

    • Updated publish token wiring in .github/workflows/publish.yml to prefer VSCE_PAT and fall back to PUBLISHER_KEY.
    • Preserves existing behavior while restoring compatibility with current secret naming.
  • Resulting behavior

    • Publish step can authenticate when either secret is configured.
    • No change to release artifact creation or publish action version.
with:
  pat: ${{ secrets.VSCE_PAT || secrets.PUBLISHER_KEY }}
  registryUrl: https://marketplace.visualstudio.com
  extensionFile: ./vscode-github-actions-${{ needs.release.outputs.version }}.vsix

Copilot AI changed the title [WIP] Fix the failing GitHub Actions workflow publish Fix publish workflow auth by supporting VSCE_PAT with backward-compatible fallback Apr 17, 2026
Copilot AI requested a review from salmanmkc April 17, 2026 09:11
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