注目イベント!
アドベントカレンダー2026開催中!
アドベントカレンダーが今年も開催です! 1年の締めくくりに、毎日新しい技術トピックをお届けします。
詳細はこちらから!
event banner

A GitHub Actions Workflow for Publishing VS Code Extensions to Open VSX Registry for IDEs Like Cursor, and Common Pitfalls

| 11 min read
Author: masahiro-kondo masahiro-kondoの画像
Information

To reach a broader audience, this article has been translated from Japanese.
You can find the original version here.

Introduction

#

The other day, when I upgraded my self-made VS Code extension changelog-support, an issue was filed asking me to publish it on Open VSX Registry as well.

I wondered why another registry was needed when Visual Studio Marketplace already exists, so I asked Gemini, and it said:

The Terms of Use for the official Visual Studio Marketplace operated by Microsoft explicitly state that “extensions available for download from the Marketplace may only be used with official Microsoft products (such as Visual Studio Code, Visual Studio, and GitHub Codespaces).”
Therefore, it is a violation of the terms for third-party forks (such as Cursor, Windsurf, VSCodium, and Eclipse Theia) to directly download and distribute extensions by calling the official Marketplace API from their custom-built binaries.

In other words:

  • Official VS Code users → Install from Visual Studio Marketplace
  • Users of VS Code forks such as Cursor / Windsurf / VSCodium → Install from Open VSX Registry because licensing and technical restrictions prevent them from connecting to the official Marketplace

This appears to be how the ecosystem is divided. I have used Eclipse Che and Gitpod in the past, but I did not remember Open VSX Registry.

Category Representative Editors / Environments Registry Used
Official Microsoft products VS Code / GitHub Codespaces Visual Studio Marketplace
AI-powered fork-based IDEs Cursor / Windsurf / Trae Open VSX Registry (+ proprietary caches)
OSS / privacy-focused environments VSCodium / Eclipse Theia Open VSX Registry
Cloud / browser IDEs Google Cloud Workstations / Firebase Studio / Gitpod / code-server Open VSX Registry

So, I decided to create a GitHub Actions workflow that publishes changelog-support to both Visual Studio Marketplace and Open VSX Registry when releasing it.

Workflow Structure

#

The @vscode/vsce command is provided for publishing to Visual Studio Marketplace, while the ovsx command is provided for publishing to Open VSX Registry.

I divided the workflow into the following three jobs:

  • Build the extension package
  • Publish to Visual Studio Marketplace
  • Publish to Open VSX Registry
flowchart LR
    job1["Build Package"]
    
    subgraph Parallel Execution
        direction TB
        job2["Publish to Visual Studio Marketplace"]
        job3["Publish to Open VSX Registry"]
    end

    job1 --> job2
    job1 --> job3

The reason I did not make these sequential steps in a single job will be explained later.

Below is the complete workflow I created.

publish-extension.yml
name: Publish extension

on:
  push:
    tags:
      - "v*"
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    outputs:
      vsix_name: ${{ steps.package.outputs.vsix_name }}
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm

      - name: Install dependencies
        run: npm ci

      - name: Verify tag and package version match
        if: startsWith(github.ref, 'refs/tags/v')
        run: |
          TAG_VERSION="${GITHUB_REF_NAME#v}"
          PACKAGE_VERSION="$(node -p "require('./package.json').version")"
          if [ "$TAG_VERSION" != "$PACKAGE_VERSION" ]; then
            echo "Tag version ($TAG_VERSION) does not match package.json version ($PACKAGE_VERSION)."
            exit 1
          fi

      - name: Package VSIX
        id: package
        run: |
          PACKAGE_VERSION="$(node -p "require('./package.json').version")"
          VSIX_NAME="changelog-support-${PACKAGE_VERSION}.vsix"
          npx @vscode/vsce package --no-yarn
          echo "vsix_name=$VSIX_NAME" >> "$GITHUB_OUTPUT"

      - name: Upload VSIX artifact
        uses: actions/upload-artifact@v4
        with:
          name: extension-vsix
          path: ${{ steps.package.outputs.vsix_name }}
          if-no-files-found: error

  publish-marketplace:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Download VSIX artifact
        uses: actions/download-artifact@v4
        with:
          name: extension-vsix

      - name: Publish to VS Code Marketplace
        run: npx @vscode/vsce publish --pat "$VSCE_PAT" --packagePath "${VSIX_NAME}"
        env:
          VSCE_PAT: ${{ secrets.VSCE_PAT }}
          VSIX_NAME: ${{ needs.build.outputs.vsix_name }}

  publish-open-vsx:
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Download VSIX artifact
        uses: actions/download-artifact@v4
        with:
          name: extension-vsix

      - name: Publish to Open VSX Registry
        run: npx ovsx publish "${VSIX_NAME}" -p "$OVSX_PAT"
        env:
          OVSX_PAT: ${{ secrets.OVSX_PAT }}
          VSIX_NAME: ${{ needs.build.outputs.vsix_name }}

Workflow Flow

#
  • Build job
    • Trigger: v* tag push (and manual workflow_dispatch)
    • Install dependencies
    • Verify that the tag version matches the version in package.json
    • Build the package
    • Upload the built package as an artifact
  • Publish to Visual Studio Marketplace
    • Download the artifact
    • Publish using the vsce command with the PAT stored in the VSCE_PAT secret
  • Publish to Open VSX Registry
    • Download the artifact
    • Publish using the ovsx command with the PAT stored in the OVSX_PAT secret

Key Workflow Implementation Points

#

Resilience to Reruns Through Job Separation (Ensuring Idempotency)

If vsce publish and ovsx publish are run sequentially in a single job, and one succeeds while the other fails due to a timeout or expired token, rerunning the workflow causes an error on the side that already succeeded, saying that the same version already exists. You then end up having to recreate the tag. Since the VSIX is created as an artifact in build, and publish-marketplace and publish-open-vsx are separated into independent parallel jobs, you can use “Re-run failed jobs” to rerun only the failed job precisely.

Version Consistency Check Between the Tag and package.json

The Verify tag and package version match step includes a guard that immediately fails if the version in the v* tag differs from the version in package.json. This prevents accidents where the tag name and version do not match.

Sharing a Single Artifact (VSIX)

Since the same built .vsix file is distributed to both registries, the workflow structure prevents situations where the Marketplace and Open VSX versions differ slightly in build environment or package contents.

Process for Registering a Publisher on OpenVSX Registry

#

Now, although I created the workflow first, the part that tends to be tricky is creating an Open VSX Registry account and getting publisher verification. It is straightforward if you are already verified, but since this was my first time, I stumbled a few times. The overall process is as follows:

  • Log in to Open VSX with GitHub
  • From your Open VSX Profile, select Log in with Eclipse
    • (If you do not have an account) Create an account with Eclipse Foundation
  • Agree to the displayed Publisher Agreement
  • Create a publisher namespace in Open VSX Registry
  • Issue a new PAT for publishing
  • Submit an issue to Open VSX Registry to claim ownership of the namespace
    • Submit your GitHub repository and Visual Studio Marketplace page as evidence
  • Once the request is approved, publish the extension under the namespace
Information

Even if the namespace has not yet been approved, you can run the publishing process with the ovsx command. In that case, it will become visible to Registry users once the namespace has been approved.

Issues I Ran Into

#

When trying to issue a PAT, I got an error saying that my GitHub user was not registered with Eclipse Foundation even though I was logged in with GitHub

I needed to register my GitHub User in my Eclipse Foundation Profile. It should look like the following 🙆.

Eclipse Foundation profile page

I tried to publish a VSIX without creating a namespace, resulting in an error that the namespace did not exist

A publisher namespace is required to register an extension. The extension's publication URL will be as follows:

https://open-vsx.org/extension/<publisher-namespace>/<extension-name>

The job succeeded, but no extension page was created and it did not appear in search results

The namespace had not been verified.

Eclipse Foundation profile page

As shown below, the extension itself existed, but it was not publicly available.

Eclipse Foundation profile page

Namespace verification was required for publication. Unlike a verified publisher on the GitHub Actions Marketplace, it is not something that can be published without verification.

The issue I submitted is below.

I provided the following as evidence.

- GitHub repository: https://github.com/kondoumh/changelog-support
- package.json publisher: kondoumh
- repository metadata: https://github.com/kondoumh/changelog-support/blob/master/package.json
- Marketplace extension: https://marketplace.visualstudio.com/items?itemName=kondoumh.changelog-support
- GitHub account: https://github.com/kondoumh

I submitted the request, and it was approved the next morning. The public page was properly created.

kondoumh.changelog-support | Open VSX Registry

And all was well.

Could the UX be improved a little?

I do not mean to disparage the noble project that is Open VSX Registry, but if the registration UX could be improved a little more, the barrier to registration would be lower and both developers and users would be happier...

Conclusion

#

That was the story of setting up a GitHub Actions workflow to publish my self-made VS Code extension to both Visual Studio Marketplace and Open VSX Registry. It may seem a little excessive to deploy a barely downloaded extension to multiple registries with comprehensive CI/CD support, but it will make version upgrades easier. I will choose to think that it has laid the groundwork for publishing a second and third extension from the kondoumh publisher.

豆蔵では共に高め合う仲間を募集しています!

recruit

具体的な採用情報はこちらからご覧いただけます。