This document describes how to release new versions of the theia-data-bridge extension using GitHub Actions.
The release process is automated using GitHub Actions and consists of three workflows:
- Build & Test (
build.yml) - Runs on every push and PR to validate the code - Package (
package.yml) - Builds the.vsixfile (can be triggered manually or by release) - Release (
release.yml) - Publishes to VS Code Marketplace and/or Open VSX Registry
Before creating a release, ensure:
- All changes are merged to
main - Tests are passing
- Version in
package.jsonis ready (it will be updated automatically during release) - CHANGELOG is updated (if you maintain one)
- Go to your repository on GitHub
- Click on "Releases" in the right sidebar
- Click "Draft a new release"
- Create a new tag following semantic versioning (e.g.,
v0.1.0,v1.0.0)- Format:
v<major>.<minor>.<patch> - Example:
v0.1.0for the first release
- Format:
- Fill in the release title and description
- Click "Publish release"
Once you publish the release, GitHub Actions will automatically:
- ✅ Check out the code
- ✅ Install dependencies (using pnpm)
- ✅ Update
package.jsonversion to match the tag (strips thevprefix) - ✅ Build the extension (
pnpm run build) - ✅ Package the extension into a
.vsixfile (pnpm run package) - ✅ Publish to VS Code Marketplace (if enabled)
- ✅ Publish to Open VSX Registry (if enabled)
- ✅ Upload the
.vsixfile as a release asset
You need to configure the following secrets in your GitHub repository settings:
VSCE_PUBLISH_TOKEN- Personal Access Token from Azure DevOps- Go to https://dev.azure.com
- Create a new organization if needed
- User Settings → Personal Access Tokens → New Token
- Scopes:
Marketplace→AcquireandManage - Copy the token and add as a GitHub secret
OVSX_PUBLISH_TOKEN- Access Token from Open VSX- Go to https://open-vsx.org
- Sign in with GitHub
- Settings → Access Tokens → New Access Token
- Copy the token and add as a GitHub secret
Configure these variables in Settings → Secrets and variables → Actions → Variables:
PUBLISH_VSCODE- Set totrueto enable VS Code Marketplace publishingPUBLISH_OVSX- Set totrueto enable Open VSX Registry publishing
Note: You can enable one or both publishing targets. If you only want to create
.vsixfiles without publishing, set both tofalseor leave them unset.
For additional safety, configure a prod environment:
- Go to Settings → Environments → New environment
- Name:
prod - Add protection rules (optional but recommended):
- Required reviewers (require manual approval before publishing)
- Deployment branches (only allow releases from
main)
Before creating a release, you can test the packaging locally:
# Install dependencies
pnpm install
# Build the extension
pnpm run build
# Package the extension
pnpm run packageThis creates a .vsix file that you can:
- Install locally:
code --install-extension theia-data-bridge-0.0.1.vsix - Share with others for testing
- Manually upload to the marketplace
To install the extension on other machines for testing:
- Go to the Releases page
- Download the
.vsixfile from the latest release - In VS Code: Extensions → "..." menu → "Install from VSIX..."
- Select the downloaded file
# Build and package
pnpm run build && pnpm run package
# Share the generated .vsix file
# Install on target machine:
code --install-extension theia-data-bridge-X.Y.Z.vsix# From a URL (after GitHub release)
code --install-extension https://github.com/YOUR_ORG/theia-data-bridge/releases/download/v0.1.0/theia-data-bridge-0.1.0.vsixFollow Semantic Versioning:
- Major (X.0.0): Breaking changes
- Minor (0.X.0): New features, backwards compatible
- Patch (0.0.X): Bug fixes, backwards compatible
Examples:
v0.1.0- First releasev0.1.1- Bug fixv0.2.0- New featurev1.0.0- First stable release
Check the GitHub Actions logs:
- Go to Actions tab
- Click on the failed workflow run
- Expand the failed step to see the error
Common issues:
- TypeScript errors: Run
pnpm run ts:checklocally - Linting errors: Run
pnpm run lintlocally - Missing dependencies: Ensure
pnpm-lock.yamlis committed
- VS Code Marketplace: Verify your
VSCE_PUBLISH_TOKENis valid - Open VSX: Verify your
OVSX_PUBLISH_TOKENis valid - Publisher Mismatch: Ensure the
publisherfield inpackage.jsonmatches your marketplace publisher ID
- Check the extension logs: View → Output → Select "theia-data-bridge"
- Verify the server started: Look for "HTTP server started" message
- Test the server:
curl http://127.0.0.1:16281/
Runs on every push/PR. Validates code quality (type checking, linting, building).
Reusable workflow that builds and packages the .vsix file. Can be called by other workflows.
Triggered when you publish a GitHub release. Packages and publishes the extension.
- Test Before Release: Always test the built
.vsixfile locally before publishing - Update Documentation: Keep README.md and CHANGELOG.md up to date
- Use Pre-releases: For beta versions, mark the GitHub release as "pre-release"
- Gradual Rollout: Consider releasing to Open VSX first (for Theia testing) before VS Code Marketplace
- Version Tags: Always use
vprefix for tags (e.g.,v1.0.0)
After setting up the release workflow:
- Configure the required secrets and variables
- Make a test release (e.g.,
v0.1.0) - Verify the extension works when installed from the
.vsixfile - If publishing to marketplaces, verify it appears correctly