Skip to content

Feature: Automate Extension Publishing with GitHub Action#2

Description

@taj54

Hi there 馃憢,

I noticed your repository publishes a VS Code extension. I wanted to share a useful GitHub Action that could help streamline your release workflow.

The action is HaaLeo/publish-vscode-extension and it allows you to automatically publish extensions to:

  • Open VSX Registry (used by VSCodium, Gitpod, etc.)
  • Visual Studio Marketplace

With this action, you can:

  • Package your extension once and publish it to multiple registries.
  • Use secrets to securely store tokens.
  • Skip duplicates and even run dry tests before publishing.
  • Automate release on tag push, PR merge, or manual trigger.

Example Workflow

on:
  push:
    tags:
      - "*"

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - name: Publish to Open VSX
        uses: HaaLeo/publish-vscode-extension@v2
        with:
          pat: ${{ secrets.OPEN_VSX_TOKEN }}
      - name: Publish to VS Marketplace
        uses: HaaLeo/publish-vscode-extension@v2
        with:
          pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
          registryUrl: https://marketplace.visualstudio.com

馃檵 If you鈥檇 like, I can open a PR to add this workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions