Plus One Publish
Increment the extension version and create a VSIX package.
Steps
- •Read the current version from
package.json - •Increment the patch version by 0.0.1 (e.g., 0.1.4 → 0.1.5)
- •Update
package.jsonwith the new version - •Create the
.vsixfolder if it doesn't exist - •Generate release notes from commits since the last version tag
- •Run
vsce packageto create the VSIX file in the.vsixfolder - •Commit the version bump and create a version tag
Commands
powershell
# Ensure .vsix folder exists
New-Item -ItemType Directory -Force -Path ".vsix"
# Get the previous version tag (format: v0.1.4)
$previousTag = git describe --tags --abbrev=0 2>$null
# Generate release notes from commits since last tag
if ($previousTag) {
$commits = git log "$previousTag..HEAD" --pretty=format:"- %s" --no-merges
} else {
$commits = git log --pretty=format:"- %s" --no-merges
}
# Save release notes to .vsix folder
$version = (Get-Content package.json | ConvertFrom-Json).version
$releaseNotesPath = ".vsix/RELEASE_NOTES_$version.md"
@"
# Release Notes - v$version
## Changes
$commits
"@ | Out-File -FilePath $releaseNotesPath -Encoding utf8
Write-Host "Release notes saved to $releaseNotesPath"
# Package the extension into .vsix folder
vsce package -o .vsix/
# Commit version bump and tag the release
git add package.json
git commit -m "Bump version to $version"
git tag -a "v$version" -m "Release v$version"
Write-Host "Created tag v$version - push with: git push origin main --tags"
Notes
- •Requires
@vscode/vsceto be installed (npm install -g @vscode/vsce) - •The VSIX file will be named
markco-<version>.vsix - •Commit the version bump before publishing