This guide covers the setup required to publish the Virgil extension to both the VS Code Marketplace and Open VSX Marketplace.
- Go to Azure DevOps
- Sign in with your Microsoft account (or create one)
- Create a new organization if you don't have one
- Go to Marketplace Management
- Create a publisher account:
- Click "Create Publisher"
- Choose a unique publisher ID (e.g.,
ealt) - Fill in your publisher details
- Accept the Marketplace Publisher Agreement
- Go to Azure DevOps User Settings
- Click "New Token"
- Configure the token:
- Name:
VS Code Extension Publishing(or similar) - Organization: Select your organization
- Expiration: Choose appropriate expiration (90 days, 1 year, or custom)
- Scopes: Select Marketplace (Manage)
- Name:
- Click "Create"
- Copy the token immediately - you won't be able to see it again!
- Go to your GitHub repository:
https://github.com/ealt/virgil - Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Configure the secret:
- Name:
VSCE_PAT - Value: Paste your Personal Access Token from step 2
- Name:
- Click Add secret
- Go to Open VSX
- Click "Log In" and sign in with your GitHub account
- Authorize the Open VSX application
- Go to your User Settings
- Click "Create a New Namespace"
- Enter your namespace name (should match your publisher ID, e.g.,
ealt) - Click "Create Namespace"
- Go to Access Tokens
- Click "Generate New Token"
- Enter a description (e.g.,
GitHub Actions Publishing) - Click "Generate Token"
- Copy the token immediately - you won't be able to see it again!
- Go to your GitHub repository:
https://github.com/ealt/virgil - Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Configure the secret:
- Name:
OVSX_PAT - Value: Paste your Personal Access Token from step 3
- Name:
- Click Add secret
| Secret | Purpose | Setup URL |
|---|---|---|
VSCE_PAT |
VS Code Marketplace token | https://dev.azure.com/_usersSettings/tokens |
OVSX_PAT |
Open VSX token | https://open-vsx.org/user-settings/tokens |
Before publishing, verify:
- VS Code Marketplace publisher account created at https://marketplace.visualstudio.com/manage
- VS Code Personal Access Token created with "Marketplace (Manage)" scope
-
VSCE_PATsecret added to GitHub repository settings - Open VSX account created at https://open-vsx.org/
- Open VSX namespace created matching your publisher ID
- Open VSX Personal Access Token created
-
OVSX_PATsecret added to GitHub repository settings - Publisher ID in
package.jsonmatches your publisher account ID - Version in
package.jsonis correct and follows semantic versioning -
CHANGELOG.mdis updated with release notes - All CI checks are passing
- Extension has been tested in Extension Development Host
- Icon file (
icon.png) exists and is valid - README.md images use HTTPS (if any external images)
- No SVG icons in package.json (only PNG/JPG allowed)
-
Update version in
package.json:npm run version:bump <version> # Or manually edit package.json
-
Update
CHANGELOG.mdwith release notes -
Commit and push:
git add package.json CHANGELOG.md git commit -m "chore: prepare for release v0.2.0" git push origin main -
Go to GitHub Actions: https://github.com/ealt/virgil/actions/workflows/publish.yml
-
Click "Run workflow"
- Select branch:
main - Enter version:
0.2.0(must match package.json) - Click "Run workflow"
- Select branch:
-
Monitor the workflow run - it will:
- Verify version matches
- Run all quality checks (lint, type-check, build, format-check)
- Publish to marketplace using
VSCE_PATsecret
-
Follow steps 1-3 from Method 1
-
Create and push a git tag:
git tag v0.2.0 git push origin v0.2.0
-
The
release.ymlworkflow will:- Create a GitHub release
- Attach the VSIX file
- Generate release notes
-
The
publish.ymlworkflow will automatically trigger on release publication and publish to both marketplaces
For testing purposes, you can publish locally:
# Install vsce globally
npm install -g @vscode/vsce
# Login (first time only)
vsce login <publisher-id>
# Publish
vsce publishNote: Local publishing requires the PAT to be set up in your environment or you'll be prompted for it.
- Verify the secret exists in GitHub repository settings
- Ensure the secret name is exactly
VSCE_PATorOVSX_PAT(case-sensitive) - Check that the workflow has access to secrets (should work by default)
- Verify your publisher ID in
package.jsonmatches your Azure DevOps publisher account - Ensure your PAT has "Marketplace (Manage)" scope
- Check that your PAT hasn't expired
- The marketplace doesn't allow publishing the same version twice
- Bump the version in
package.jsonand try again - Use
npm run version:bumpto automate this
- Ensure the version in
package.jsonmatches the input version (for manual dispatch) - For release-triggered publishing, ensure the tag version (without
vprefix) matchespackage.json
After successful publishing:
- The extension will appear in the marketplaces within a few minutes
- Users can install it via:
- VS Code: Extensions view → Search for "Virgil"
- VS Code CLI:
code --install-extension ealt.virgil-walkthroughs - VSCodium/Open VSX compatible editors: Search for "Virgil" in the extensions view
- Verify publication at:
- Update the README.md marketplace badge links if needed
- Announce the release on your preferred channels