Publish a VS Code extension to the Marketplace and Open VSX from one pipeline
Publish one VSIX to the Marketplace and Open VSX with GitHub Actions. Follow the workflow, recover failed uploads, and check both listings.
Builds VSXRank · 10 min read

TL;DR: Build your extension's VSIX once, then upload that file to the Marketplace and Open VSX in separate jobs. If one upload fails, retry it with the original file. Check both listings afterward. The workflow below uses tokens; review the authentication section before adopting it, especially the documented December 2026 change to Marketplace tokens.
Publish a VS Code extension to the Marketplace and Open VSX#
One build and two uploads help keep your registry listings aligned. Separate publishing jobs also make it easier to recover when only one registry accepts the release.
Before adding the workflow, you need a Marketplace publisher and an Open VSX namespace with an accepted Publisher Agreement. Our Open VSX setup guide covers that second account.
Add the secrets VSCE_PAT and OVSX_PAT to your repository or release environment. The authentication section below explains their requirements and alternatives.

Add the release workflow#
Save this as .github/workflows/release.yml. It runs when you push a tag such as v1.4.0, checks that the tag matches package.json, builds the VSIX, and sends it to both registries.
name: Release
on:
push:
tags: ['v*']
permissions:
contents: read
jobs:
package:
runs-on: ubuntu-latest
outputs:
ext-id: ${{ steps.meta.outputs.ext-id }}
version: ${{ steps.meta.outputs.version }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
package-manager-cache: false
- run: npm ci
- id: meta
name: Check the tag matches package.json
run: |
VERSION=$(node -p "require('./package.json').version")
EXT_ID=$(node -p "const p=require('./package.json'); p.publisher + '.' + p.name")
test "v$VERSION" = "$GITHUB_REF_NAME"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "ext-id=$EXT_ID" >> "$GITHUB_OUTPUT"
- run: npx --yes @vscode/[email protected] package --out extension.vsix
- uses: actions/upload-artifact@v7
with:
name: vsix
path: extension.vsix
if-no-files-found: error
marketplace:
needs: package
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/download-artifact@v8
with:
name: vsix
- uses: actions/setup-node@v7
with:
node-version: 22
package-manager-cache: false
- run: npx --yes @vscode/[email protected] publish --packagePath extension.vsix --skip-duplicate
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
open-vsx:
needs: package
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/download-artifact@v8
with:
name: vsix
- uses: actions/setup-node@v7
with:
node-version: 22
package-manager-cache: false
- run: npx --yes [email protected] publish extension.vsix --skip-duplicate
env:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
verify:
needs: [package, marketplace, open-vsx]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v7
with:
node-version: 22
package-manager-cache: false
- name: Both registries list this version
env:
EXT_ID: ${{ needs.package.outputs.ext-id }}
VERSION: ${{ needs.package.outputs.version }}
run: |
for attempt in $(seq 1 10); do
mkt=no; ovsx=no
npx --yes @vscode/[email protected] show "$EXT_ID" --json \
| jq -e --arg v "$VERSION" 'any(.versions[]; .version == $v)' >/dev/null && mkt=yes
curl -fsS "https://open-vsx.org/api/${EXT_ID/.//}/$VERSION" \
| jq -e --arg v "$VERSION" '.version == $v' >/dev/null && ovsx=yes
echo "attempt $attempt: marketplace=$mkt open-vsx=$ovsx"
if [ "$mkt" = yes ] && [ "$ovsx" = yes ]; then exit 0; fi
sleep 30
done
exit 1We checked this workflow with actionlint, ran the packaging commands and offline CLI validation on a sample extension, and ran the verification loop against a live listing. We have not published a real release from this exact file. Try it in a test repository and publisher namespace before using it for a production release.
What the jobs do#
- Package: builds one VSIX and saves it as a workflow artifact. The tag check prevents a tag such as
v1.4.0from publishing a package still marked1.3.9. - Marketplace and Open VSX: download that file and publish independently. The
vsce --packagePathoption andovsx publish <file>both accept an existing package. - Verify: checks that both registries list the expected version, retrying for up to five minutes.
The CLIs are pinned to @vscode/vsce 4.0.0 and ovsx 1.2.0, the releases used for our 22 September 2026 checks. Both require Node 22 or later. Pinning keeps a later CLI update from silently changing the workflow.
The release environment lets you scope secrets and require reviewers. Caching is disabled because setup-node warns about cache poisoning in privileged workflows. The action versions shown use Node 24, following GitHub's Node 20 removal schedule.
Check your authentication setup#
Marketplace tokens and the December 2026 change#
vsce reads VSCE_PAT when you do not pass -p. Microsoft's publishing guide requires Marketplace (Manage) scope and All accessible organizations for the Azure DevOps token.
The same guide documents retirement of global Azure DevOps Personal Access Tokens on 1 December 2026. Treat the token-based example as a setup that needs an authentication migration, rather than a permanent release configuration.
Microsoft's documented replacement uses Microsoft Entra ID: a user-assigned managed identity with a federated credential, added to the publisher account, then vsce publish --azure-credential. Its walkthrough uses Azure Pipelines.
For GitHub Actions, there are two additional routes to investigate:
- Azure login followed by
--azure-credential: vsce 4.0.0's credential chain includes Azure CLI credentials. Anazure/loginstep using OpenID Connect (OIDC) should therefore work. This is an inference from the CLI source, not a Microsoft-documented GitHub Actions recipe. vsce publish --oidc: the vsce README describes trusted publishing for a repository and workflow. It needsid-token: writepermission and does not fall back to a PAT. In 4.0.0 the flag is hidden from--help, and the VS Code guide does not yet explain the Marketplace setup. Check that your publisher page offers the required policy before relying on it.
Open VSX tokens and trusted publishing#
ovsx reads OVSX_PAT. The CLI guide also supports ovsx publish --trusted-publishing, using a repository and workflow registered by a namespace owner under trusted publishers. The job needs id-token: write.
The trusted publishing guide lists limits: publish the first version with a token, use one trusted publisher per extension, and confirm that the registry has enabled the feature. An explicit token or OVSX_PAT takes precedence over trusted publishing. Keep the token-based setup until the option is available for your namespace; when switching, account for that precedence.
Recover when only one upload succeeds#
A release can succeed on one registry and fail on the other. You usually want to finish the second upload using the same package.

- Read the failed job's error. Fix the named token, namespace, or package issue.
- Reuse the original VSIX if its contents are correct. GitHub lets you re-run jobs for 30 days using the original commit and ref. The job downloads the saved artifact.
- Use
--skip-duplicatefor retries. Both CLIs can skip a version that is already published, allowing you to finish a partial release. - Use a new version if the package must change. Neither registry lets you replace a published version in place. The Marketplace also reserves an unpublished version number. Publish the corrected patch version to both registries.
Skipping duplicates does not check that an existing package contains the same bytes. It can also hide a forgotten version bump. The tag check catches a mismatch between the tag and manifest, but it cannot tell whether an otherwise matching version was published earlier.
Check both listings after publishing#
The verify job checks the version through vsce show <id> --json and the Open VSX version endpoint. Open VSX returns the version's metadata when found, or 404 when absent.
For platform-specific releases, check the target lists too. Marketplace versions include targetPlatform, and the Open VSX response has a downloads object keyed by platform. The basic verification job above checks the version, not every target.
Finally, open both listing pages. Check the README images, icon, changelog, and repository link. A successful upload does not tell you whether every part of the listing displays as intended.
Adapt the workflow for pre-releases or native packages#
Pre-releases#
The pre-release marker is stored inside the VSIX. Package with vsce package --pre-release --out extension.vsix, then publish with vsce publish --packagePath extension.vsix --pre-release.
vsce 4.0.0 rejects that publish flag if the package was not built as a pre-release. For a prebuilt package, ovsx reads the marker from the manifest and warns if you also pass --pre-release.
The Marketplace accepts major.minor.patch versions, rather than semver pre-release suffixes. Its guide recommends even minor numbers for stable releases and odd minor numbers for pre-releases.
Platform-specific packages#
For native code, build a separate VSIX for each target. The documented targets are win32-x64, win32-arm64, linux-x64, linux-arm64, linux-armhf, alpine-x64, alpine-arm64, darwin-x64, darwin-arm64, and web.
This example shows the packaging steps to adapt; it is not a complete replacement for the earlier job and its metadata outputs:
package:
strategy:
matrix:
target: [win32-x64, linux-x64, darwin-arm64]
runs-on: ubuntu-latest
steps:
# checkout, setup-node and npm ci as above
- run: npx --yes @vscode/[email protected] package --target ${{ matrix.target }} --out extension-${{ matrix.target }}.vsix
- uses: actions/upload-artifact@v7
with:
name: vsix-${{ matrix.target }}
path: extension-${{ matrix.target }}.vsix
if-no-files-found: errorDownload the artifacts in each publish job with pattern: vsix-* and merge-multiple: true. Publish them with vsce publish --packagePath extension-*.vsix --skip-duplicate and ovsx publish --packagePath extension-*.vsix --skip-duplicate.
Both CLIs read the target from each package. vsce rejects --target combined with --packagePath. If a native dependency needs to compile on its target operating system, use a matching runner for that matrix entry.
vsce 4.0.0 uploads files one at a time and stops at the first error. ovsx 1.2.0 uploads in parallel, reports failures, and exits with an error if any fail. Some targets may therefore be live after a failed job; check both registries when retrying.
Why checking both registries matters#
On 22 September 2026, 15.6% of the 14,065 extensions listed under the same ID on both registries showed different latest versions. Our catalog read finished at about 01:12 UTC:
| Dual-listed extensions (same ID on both) | Count | Share |
|---|---|---|
| Listed on both registries | 14,065 | 100% |
| Same latest version on each | 11,867 | 84.4% |
| Open VSX's latest is an older Marketplace version | 1,145 | 8.1% |
| Marketplace's latest is an older Open VSX version | 482 | 3.4% |
| Version histories share neither latest version | 523 | 3.7% |
| Each lists the other's latest (ordering differs) | 47 | 0.3% |
We also looked at the latest stable Marketplace release from each of 2,701 extensions that were listed on both registries and released between 23 August and 21 September:
| Last stable Marketplace release, 23 Aug–21 Sep 2026 | Extensions | Share |
|---|---|---|
| Same version on Open VSX by 22 September | 2,423 | 89.7% |
| Registry timestamps within one hour of each other | 2,176 | 80.6% |
| Registry timestamps within 24 hours | 2,331 | 86.3% |
| Reached Open VSX more than a day later | 55 | 2.0% |
| Not on Open VSX as of 22 September | 278 | 10.3% |
Most matching versions had timestamps close together. Each registry records its own timestamp, though, and we do not know whether they mark the same processing step. In 98 cases, the Open VSX timestamp was more than an hour earlier.
A snapshot also cannot tell us whether a missing version will arrive later. Of 1,067 extensions whose Open VSX listing trailed a stable Marketplace release, 560 had been behind for more than a year, while only 53 fell behind in the last seven days. The median gap was 401 days and typically two stable versions. That suggests some publishing workflows stopped updating the second registry, though it does not prove the reason.
Kilo Code provides an example of closely timed releases: Open VSX timestamped 7.7.7 at 06:42 UTC on 22 September, and Marketplace platform records were timestamped around 06:53 UTC. Both listed eight platform builds.
Of 9,064 Marketplace extensions releasing a stable version in the same 30 days, 6,363 had no Open VSX match under the same ID. That included 537 with at least 1,000 installs and 54 with at least 100,000. About half of the latter came from Microsoft publishers. Matching by ID misses projects republished under another name; the September catalog report explains that limit.
Should you use HaaLeo's publishing action?#
HaaLeo/publish-vscode-extension wraps the two CLIs and is linked by the Open VSX wiki. Its vsixPath output lets you reuse the package across registries. It also exposes options for pre-releases, duplicate skipping, targets, dependencies, and dry runs.
Here is how its v2 release compared with the direct CLI setup on 22 September 2026:
| HaaLeo action v2 | Direct CLI (this guide) | |
|---|---|---|
| Setup | One uses: step per registry | A run: line per registry |
| CLI versions | Bundled: vsce ^3.2.2, ovsx ^0.10.1 | You pin: vsce 4.0.0, ovsx 1.2.0 |
| Authentication | pat input is required | PAT, --azure-credential, OIDC flags |
| Latest release | v2.0.0, 23 February 2025 | npm releases in September 2026 |
| Action runtime | node20 in action.yml | Your chosen Node 22 |
The action requires a pat input and does not expose the newer Entra ID or trusted-publishing flags. That leaves an authentication migration to solve before the documented December PAT retirement. Its Node 20 declaration is less central here, since GitHub now runs Node 20 actions on Node 24.
The wrapper can save setup work for a token-based release. Direct CLI calls give you access to the newer authentication options when you are ready to configure them.
Once both listings are live, keep their counts separate: Marketplace installs and Open VSX downloads have different meanings. The live demo shows both alongside release dates on one extension page.