We follow semver for versioning. Given a version number MAJOR.MINOR.PATCH, increment the:
- MAJOR version when you make incompatible API changes
- MINOR version when you add functionality in a backwards-compatible manner
- PATCH version when you make backwards-compatible bug fixes
An example release candidate version <VERSION_RC>
could be 2.0.0-rc.1
- Make sure all features for the forthcoming release have been merged to
development
branch. - Checkout and pull
development
branchgit checkout development && git pull
- Make sure README.md file has been updated
- Make sure CHANGELOG.md has been updated
- with new version number
- with all Public, Internal and UI changes
- with a link to diff between last and current version (at the bottom of the file)
- Make sure MIGRATION.md has been updated, if applicable.
- Update the SDK package version in
package.json
to<VERSION_RC>
- Increment
BASE_32_VERSION
inwebpack.config.babel.js
e.g.AA
=>AB
- NOTE: do it only if a breaking change is introduced between SDK and cross device client. This must be done only ONCE per release, not per release candidate
- Install npm dependencies
npm install
- Build the dist files for release candidate
npm run build
- [Cross Device] Deploy dist files to the incremented
<BASE_32_VERSION>
on AWS production:aws s3 sync ./dist s3://tf-assets-20180717150854152100000001/web-sdk-base32-releases/<BASE_32_VERSION>/ --exclude "*.html" --acl public-read --delete
- [Lazy loading] Deploy dist files to the release candidate <VERSION_RC> on S3 production
- use
<VERSION_RC>
- use
- Update JSFiddle demo link in README.md
- Create a release branch:
release/<VERSION>
. Use the final version rather than a release candidate in the branch namegit checkout -b release/<VERSION>
- Commit all changes with commit message including
Bump version to <VERSION_RC>
- use
<VERSION_RC>
- use
- Create release candidate tag in
npm
:npm publish --tag next
- (if you don't have access, get credentials to npm from OneLogin)
- Check that the
latest
tag has not been changed, only thenext
one:npm dist-tag ls onfido-sdk-ui
- Check you can install the package with
npm install onfido-sdk-ui@<VERSION_RC>
- On
release/<release_version>
branch, create a git tag for release candidate:git tag <VERSION_RC>
git push origin <VERSION_RC>
- Perform regression testing
- test the SDK deployment on surge link associated with the PR
An example release version <VERSION>
could be 2.0.0
- If the release candidate has not uncovered any bugs.
- Bump version
package.json
to release version<VERSION>
- Build the dist files for release version
npm run build
- [Cross Device] Deploy dist files to the
<BASE_32_VERSION>
on AWS production:aws s3 sync ./dist s3://tf-assets-20180717150854152100000001/web-sdk-base32-releases/<BASE_32_VERSION>/ --exclude "*.html" --acl public-read --delete
- [Lazy loading] Deploy the release dist to S3 production
- use
<VERSION>
- use
- Update JSFiddle demo link in README.md
- Commit all changes with commit message including
Bump version to <VERSION>
- Once release PR is approved, on release branch create a tag with release version (without
rc
):git tag <VERSION>
git push origin <VERSION>
- Perform the release on the release branch:
npm publish
- Check you can install your release with
npm install onfido-sdk-ui
- latest
<VERSION>
release should be installed
- latest
- Merge
release/<release_version>
PR tomaster
- Merge
master
todevelopment
git checkout master && git pull -p
git checkout development && git pull -p
git merge master
git push
- Create a new release on GitHub, using release tag:
- title should be a version number
<VERSION>
- as description use the entries for that version from CHANGELOG.md
- title should be a version number
- After the release: Update Sample App
Deploying dist/
folder to S3 is a crucial part of the release. It allows us to have a working demo of the SDK in JSFiddle and, more importantly, to support code splitting and lazy loading when the SDK is imported using HTML.
- Make sure version is bumped in
package.json
- Make sure the
dist/
folder is updated and commited (bynpm run build
) - Run
aws s3 sync ./dist s3://tf-assets-20180717150854152100000001/web-sdk-releases/<VERSION> --exclude "*.html" --acl public-read --delete
- Note: Mind that
<VERSION>
should be used only for release version and<VERSION_RC>
should be used for release candidates instead. Apply according to instructions in guidelines!
- Note: Mind that
- Make sure
style.css
,onfido.min.js
andonfido.crossDevice.min.js
are in the S3 folder
Now you can go on and update JSFiddle.
- Make sure Deploying the release to S3 production step has been executed before
- Open the JSFiddle and update its resources to the following:
https://assets.onfido.com/web-sdk-releases/<VERSION>/style.css
https://assets.onfido.com/web-sdk-releases/<VERSION>/onfido.min.js
- Follow the migration notes and update the code if necessary
- Test the happy path
- Copy the new JSFiddle link into README.md
- Clone https://github.com/onfido/onfido-sdk-web-sample-app
- After the release, bump Onfido SDK version in
package.json
of Sample App - If Onfido SDK release introduced breaking changes, apply them according to migration guide
- Issue PR with mentioned changes to master
Review and update, if necessary, the "feature matrix" and the relevant subpages under the SDK (Web & Mobile) section of the Onfido product documentation.