Releasing new versions
This document describes how to release a new version of Some Sass.
A new release typically involves two assets:
- The language service package is published to
npm
. - The Visual Studio Code extension is published to:
Conventional Commits
We use nx to version and tag the language service module based on conventional commits.
nx reads the commit messages to determine what the new version should be, and to generate changelogs. Which version is released depends on how you write the commit message.
Commit message | Release type |
---|---|
docs: add guide for configuring sublime | No new release. |
fix: update css-languageservice | Patch. Bugfix release, updates for runtime dependencies. |
feat: add support for show keyword in fo÷rward | Minor. New feature release. |
refactor: remove reduntant options for latest language version BREAKING CHANGE: The scanImportedFiles option has been removed. | Major. Breaking release, like removing an option or changing engines version. (Note that the BREAKING CHANGE: token must be in the footer of the commit) |
Release process
To start a new release, run node .scripts/release.mjs
. This script:
- Gets the latest
main
branch withgit checkout main && git pull
. - Runs
npm clean-install
. - Runs
npm run release
which updates versions, generates changelogs and Git tags. - Pushes the changes and tags with
git push && git push --tags
.
GitHub Actions does the actual publishing when there are new tags.
The script continues to:
- Update the dependency on the server in
vscode-extension/package.json
. - Bump the version number of the extension.
- Run
npm install
to update the lockfile. - Commit the changes and run
git tag some-sass@<version from package.json>
. - Run
git push && git push --tags
.
Again, GitHub Actions is does the actual publishing when there are new tags.
Manual release process
In case npm run release
fails, or GitHub Actions can't publish, here's how you can release manually (provided you have access).
To prepare the repository:
git checkout main
git pull
npm clean-install
npm run build
npm run test:all
Then, in packages/language-server
:
# run npm version first if nx failed
npm publish
In vscode-extension/
:
vsce package
Then log in to and publish manually via Visual Studio Marketplace, Open VSX and GitHub Releases (attach the .vsix
file to the release).
References: