If you need to release a new version of @ericcornelissen/eslint-plugin-top
,
follow the guidelines found in this document.
To release a new version follow these steps:
- Manually trigger the release workflow from the
main
branch; Use an update type in accordance with Semantic Versioning. This will create a Pull Request that start the release process. - Follow the instructions in the Pull Request description.
If it's not possible to use automated releases, or if something goes wrong with
the automatic release process, you can follow these steps to release a new
version (using v3.1.4
as an example):
-
Make sure that your local copy of the repository is up-to-date, sync:
git checkout main git pull origin main
Or clone:
git clone [email protected]:ericcornelissen/eslint-plugin-top.git
-
Update the version number in the package manifest and lockfile:
npm version v3.1.4 --no-git-tag-version
If that fails, change the value of the version field in
package.json
to the new version:- "version": "3.1.3", + "version": "3.1.4",
and update the version number in
package-lock.json
usingnpm install
(after updatingpackage.json
), which will sync the version number. -
Update the changelog:
node script/bump-changelog.js
If that fails, manually add the following text after the
## [Unreleased]
line:- _No changes yet_ ## [3.1.4] - YYYY-MM-DD
The date should follow the year-month-day format where single-digit months and days should be prefixed with a
0
(e.g.2022-01-01
). -
Commit the changes to a new release branch and push using:
git checkout -b release-$(sha1sum package-lock.json | awk '{print $1}') git add CHANGELOG.md package.json package-lock.json git commit --message "version bump" git push origin release-$(sha1sum package-lock.json | awk '{print $1}')
-
Create a Pull Request to merge the release branch into
main
. -
Merge the Pull Request if the changes look OK and all continuous integration checks are passing.
[!NOTE] At this point, the continuous delivery automation may pick up and complete the release process. If not, or only partially, continue following the remaining steps.
-
Immediately after the Pull Request is merged, sync the
main
branch:git checkout main git pull origin main
-
Create a git tag for the new version:
git tag v3.1.4
-
Update the
v3
branch to point to the same commit as the new tag:git checkout v3 git merge main
-
Push the
v3
branch and new tag:git push origin v3 v3.1.4
-
Publish to npm:
npm clean-install npm run prepublishOnly npm publish --ignore-scripts=false