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 versionBREAKING 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
mainbranch withgit checkout main && git pull. - Runs
npm clean-install. - Runs
npm run releasewhich 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 installto 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:
- Update the version numbers in
package.jsonacross the different packages. - Make sure you use the new version numbers in
"dependencies". - Run
npm installto update the lockfile. - Create a manual changelog entry.
- Commit the changes.
git tagthe versions following the existing pattern (<packagename>@<version>).- Push to let GitHub Actions publish with Trusted Publishing.