This guide explains how to publish the ObjectQL VSCode extension to the Visual Studio Code Marketplace using the automated GitHub Actions workflow.
You need a publisher account to publish extensions:
- Visit Visual Studio Marketplace
- Sign in with your Azure DevOps account (or create one)
- Create a publisher if you don't have one
- Note your publisher ID (must match the
publisherfield inpackage.json)
Create a PAT for publishing:
- Go to Azure DevOps
- Click on User Settings → Personal Access Tokens
- Create a new token with:
- Organization: All accessible organizations
- Expiration: Set appropriate expiration date
- Scopes: Select
Marketplace→Manage
- Copy the token (you won't be able to see it again)
Add the PAT as a GitHub repository secret:
- Go to your repository on GitHub
- Navigate to Settings → Secrets and variables → Actions
- Click "New repository secret"
- Name:
VSCE_PAT - Value: Paste your Personal Access Token
- Click "Add secret"
This method allows you to publish on-demand through the GitHub Actions UI:
- Go to the repository on GitHub
- Click on "Actions" tab
- Select "Publish VSCode Extension" workflow
- Click "Run workflow" button
- Configure options:
- Version: Leave empty to use current version, or specify a version (e.g.,
2.0.1) - Dry run: Check to only package (test build) without publishing
- Version: Leave empty to use current version, or specify a version (e.g.,
- Click "Run workflow"
Use Cases:
- Test Build: Enable "Dry run" to package and download the VSIX for local testing
- Regular Release: Leave defaults to publish the current version
- Version Bump: Specify a new version to update and publish
Automatically publish when you create a version tag:
# Create and push a tag for the VSCode extension
git tag vscode-v2.0.1
git push origin vscode-v2.0.1This will:
- Automatically build and publish the extension
- Create a GitHub Release with the VSIX file attached
- Make the extension available on the VSCode Marketplace
The automated workflow performs the following steps:
-
Environment Setup
- Checkout repository
- Setup Node.js 20
- Install pnpm
- Cache dependencies
-
Build
- Install all monorepo dependencies
- Build the entire monorepo
- Compile the VSCode extension TypeScript code
-
Package
- Run
vsce packageto create the.vsixfile - Upload VSIX as GitHub Actions artifact (available for 30 days)
- Run
-
Publish (skipped if dry run)
- Authenticate with VSCE_PAT
- Publish to VSCode Marketplace using
vsce publish
-
Release (for git tags only)
- Create GitHub Release
- Attach VSIX file to the release
- Generate release notes
The extension version is managed in packages/tools/vscode-objectql/package.json:
{
"name": "vscode-objectql",
"version": "2.0.0",
...
}Option 1: Manual (before triggering workflow)
cd packages/tools/vscode-objectql
npm version patch # 2.0.0 → 2.0.1
npm version minor # 2.0.0 → 2.1.0
npm version major # 2.0.0 → 3.0.0
git add package.json
git commit -m "chore(vscode): bump version to X.Y.Z"
git pushOption 2: Automatic (via workflow input)
When running the workflow manually, you can specify the version in the input field, and the workflow will update package.json before publishing.
Always test the extension locally before publishing:
# From repository root
pnpm install
pnpm run build
# Navigate to extension directory
cd packages/tools/vscode-objectql
# Compile TypeScript
pnpm run compile
# Package the extension
pnpm run packageThis creates a .vsix file in the packages/tools/vscode-objectql directory.
- Open VSCode
- Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
- Click the "..." menu → "Install from VSIX..."
- Select the generated
.vsixfile - Test all features
Use the workflow with "Dry run" enabled to test the CI/CD build:
- Run workflow with dry run option checked
- Download the VSIX artifact from the workflow run
- Install and test in VSCode
Problem: The workflow cannot find the authentication token.
Solution:
- Verify the secret is named exactly
VSCE_PAT - Check it exists in Settings → Secrets and variables → Actions
- Ensure it has not expired
Problem: The PAT is invalid or has expired.
Solution:
- Generate a new PAT in Azure DevOps
- Update the
VSCE_PATsecret in GitHub - Ensure the PAT has
Marketplace: Managescope
Problem: The publisher in package.json doesn't match your VSCode Marketplace publisher.
Solution:
- Check your publisher ID at https://marketplace.visualstudio.com/manage
- Update the
publisherfield inpackages/tools/vscode-objectql/package.json - Commit and push the change
Problem: You're trying to publish a version that already exists.
Solution:
- Increment the version number in
package.json - Or specify a new version when running the workflow
-
Version Strategy
- Use semantic versioning (MAJOR.MINOR.PATCH)
- Increment PATCH for bug fixes
- Increment MINOR for new features
- Increment MAJOR for breaking changes
-
Pre-release Testing
- Always test locally before publishing
- Use dry run to validate the CI build
- Review the packaged VSIX contents
-
Changelog
- Update
CHANGELOG.mdbefore publishing - Document all changes since last release
- Follow Keep a Changelog format
- Update
-
Security
- Rotate PAT tokens regularly
- Use repository secrets, never commit tokens
- Set appropriate token expiration dates
-
Release Notes
- Use git tags for automatic release notes
- Write descriptive commit messages
- Link to issues/PRs in commits
After publishing:
-
VSCode Marketplace
- Check https://marketplace.visualstudio.com/items?itemName=objectstack-ai.vscode-objectql
- Verify the new version appears
- Test installation via VSCode
-
GitHub Release
- Check the Releases page for the new version
- Verify VSIX file is attached
- Review auto-generated release notes
-
User Feedback
- Monitor marketplace reviews
- Watch GitHub issues for bug reports
- Check analytics for install/update metrics