This project uses semantic-release to automate version management and package publishing.
semantic-release automates the entire release workflow:
- Analyzes commits - Determines version bump based on conventional commits
- Generates changelog - Creates CHANGELOG.md from commit messages
- Updates version - Bumps version in package.json
- Creates release - Tags the release and creates GitHub release
- Publishes VSIX - Packages and attaches VSIX file to release
- Commits changes - Commits package.json and CHANGELOG.md back to repo
Releases happen automatically when you push to main branch:
git push origin mainThe CI workflow will:
- Run validation, linting, and tests
- Build the extension
- Run semantic-release to create the release
No manual version bumping or tagging needed!
This project uses Conventional Commits format. See CONTRIBUTING.md for detailed commit message guidelines.
| Commit Type | Version Bump | Example |
|---|---|---|
fix: |
Patch (0.0.x) | fix: handle empty cells |
feat: |
Minor (0.x.0) | feat: add cell execution |
BREAKING CHANGE: or ! |
Major (x.0.0) | feat!: remove old API |
docs:, style:, chore: |
No release | - |
Patch Release (0.0.x):
git commit -m "fix: resolve cell rendering issue"Minor Release (0.x.0):
git commit -m "feat: add markdown cell support"Major Release (x.0.0):
git commit -m "feat!: redesign notebook API
BREAKING CHANGE: The notebook API has been completely redesigned."No Release:
git commit -m "docs: update README"
git commit -m "chore: update dependencies"When semantic-release runs, it creates:
- Git tag - e.g.,
v1.2.3 - GitHub release - With auto-generated release notes
- CHANGELOG.md - Updated with new version section
- VSIX file - Attached to GitHub release
- Commit - Updates package.json and CHANGELOG.md
The configuration is in .releaserc.json:
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer", // Analyzes commits
"@semantic-release/release-notes-generator", // Generates notes
"@semantic-release/changelog", // Updates CHANGELOG.md
["@semantic-release/npm", { "npmPublish": false }], // No npm publish
["semantic-release-vsce", { "packageVsix": true }], // Create VSIX
["@semantic-release/github", { "assets": ["*.vsix"] }], // Upload VSIX
["@semantic-release/git", { "assets": ["package.json", "CHANGELOG.md"] }] // Commit back
]
}To automatically publish to the VS Code Marketplace:
-
Create a Personal Access Token from Azure DevOps
-
Add it as a repository secret named
VSCE_PAT -
Update the
VSCE_PATin the release workflow (.github/workflows/release.ymlor similar):env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VSCE_PAT: ${{ secrets.VSCE_PAT }}
To skip a release for a commit, add [skip ci] or [skip release] to the commit message:
git commit -m "chore: update docs [skip ci]"Possible reasons:
- No commits with
feat:orfix:since last release - Only commits with
docs:,chore:, etc. - Commit doesn't follow conventional format
Solution: Ensure at least one commit has feat: or fix: type.
Check the GitHub Actions logs for errors. Common issues:
- Test failures (fix tests first)
- Linting errors (run
npm run lint) - Invalid commit messages (use conventional format)
If you need to create a manual release, you can still push tags:
npm version patch # or minor, major
git push origin main --tagsThe manual-release job (currently commented out in the workflow) can be enabled for this.
✅ Automated version bumping - No manual package.json edits ✅ Consistent changelog - Auto-generated from commits ✅ No manual tagging - Tags created automatically ✅ Enforces commit standards - Must use conventional commits ✅ Audit trail - Clear history of what changed in each version ✅ Less human error - Automation handles the details