-
Notifications
You must be signed in to change notification settings - Fork 2
Publication to NPM
Bastien Gatellier edited this page Apr 1, 2023
·
5 revisions
The ones that satisfy the following conditions:
- is listed in the
projects
key of therush.json
file, and does not have a"shouldPublish": false
attribute. - has changes since the last release (has JSON changelogs located in the common/changes/@fabernovel directory)
People who can write on the repository.
The publication of packages is a manual operation. There are two main reasons behind this choice:
- there is no strong, automated mechanisms to ensure bug minimization at the moment
- published packages cannot be rollback
To do a publication (simulated or real), choose the 🚀 Publish packages workflow from the Actions tabs of the repository, then click on the Run workflow button on the right to open the following window:
From there, you can choose:
- The branch:
master
will always be used, whatever you choose. This avoid publishing packages from work branches. - The publication mode, which indicates if you want to simulate or do the publication
- The version policy to use, which indicates the version increment strategy you want to use. The list of strategies is located in
common/config/rush/version-policies.json
:-
individualVersion
: increments every package version number according to their own minor or patch increment (depends of the type of changes made to each package) -
nextMajor
: increments every package version number to the same major version. Only used for major releases.
-
- Create a release branch (name format:
release/<workflow_id>
) - Bump packages version number
- Update the changelog of each package
- Publish the packages to npmjs.com
- Create a Git tag for each package
- Merge the release branch into
master
You now have every information to start publishing packages; you just need to click on the Run workflow button and voilà 🚀