The following document covers the release process for the artifacts in this repository.
The following details the release process of the Sidetree reference implementation @decentralized-identity/sidetree, which is a typescript based npm package.
In general the release process can be summarized by the following flow
- Each merged pull request into master results in the automated release of a new unstable package on npm, unless the
[skip ci]tag is included in the commit message. - A release commit merged into master triggers a stable release of the reference implementation.
Checklist before creating a stable release:
- Review code in
latestfolder since the previously released version in both./lib/core/versions,./lib/bitcoin/versions. If there are new changes, duplicate thelatestfolder with the new release version as the folder name. - Verify if there are DB changes that requires a DB upgrade since the last stable release, if so, make sure
upgradeDatabaseIfNeeded()code in bothcoreandbitcoinservice is updated accordingly.
To create a stable release follow the following steps:
-
Checkout the head of master
git checkout master && git pull -
Create a new release branch from master called
release:git checkout -b release -
Install the dependencies
npm install -
Build the package
npm run build -
Test the package
npm test -
Sanity check: check the repo is completely clean without pending changes by running
npm status, else the next command to commit a new version will fail. -
Run
npm run version:release, with an appropriate option such as [major|minor|patch]. -
Observe and note down the correctly incremented version number X.Y.Z change to the
package.jsonand changes toCHANGELOG.md -
Push the release branch and open a pull request for the release.
-
Once approvals have been sought, merge the pull request preserving the last commit message "
chore(ref-imp): official release". This is how release action to publish an NPM package is triggered. -
Observe the triggering of the
/.github/workflows/release.ymlgithub workflow -
Remove the tag created in the release branch:
git tag -d vX.Y.Z -
Remove the local release branch:
git checkout mastergit branch -D release
-
Push a new version tag to remote master e.g. (v1.0.4):
- git pull
- git tag vX.Y.Z
- git push origin vX.Y.Z
The resulting release will publish the new package to npm.
An unstable release is triggered on every commit to master, where the /.github/workflows/push-master.yaml is run.
The releases have the following version syntax <current package version + patch version>-unstable.<current git commit reference>
Note The /.github/workflows/push-master.yaml will skip if the commit message includes [skip ci]
Note To skip the automatic release of a new unstable version append [skip ci] to the end of the commit message
that is merged into master.
TODO document