Skip to content

Latest commit

 

History

History
49 lines (27 loc) · 3.57 KB

RELEASE_PROCESS.md

File metadata and controls

49 lines (27 loc) · 3.57 KB

Release process

Workspaces & semantic-release

We use workspaces and semantic-release to manage the release process for our SDK and SampleApp. It enforces conventional commits on every commit and pull request title so we can have automatically generated tags and changelogs.

Angular conventional commits

We use Angular's spec for conventional commits and enforce it on every commit with Husky + commitlint. Also, we enforce that our pull request titles follow the spec because we only count merge from pull requests and BREAKING CHANGE flagged commits when bumping a version or creating the changelog. It means that your regular commits wont trigger a version bump or appear in the changelog unless they have a BREAKING CHANGE flag. Instead, only the merge commits from pull requests will be used.

Creating breaking changes

Please follow the spec when adding breaking changes. Have in mind that the ! in the commit message is not really supported yet so avoid that and just add the BREAKING CHANGE: flag to the commit body. As explained in the last section, you have two ways to trigger breaking changes: On commit level and on pull request level. The recommended is to do it at commit level in order to be more specific on whats breaking and which commits is generating the breaking change, but if thats not possible for some reason, you need to add it to the pull request merge body.

image

Please have in mind that the only line you have to add is the selected one. Github already takes care of adding the PR title to the body of the merge commit.

Reverting a release

If you've released something you were not supposed to and want to remove that release from npm, remove the git tag and then rollback the changes, you have a few options:

Reset main branch

Cleanest way is to just reset the main branch and remove the last few commits, so the ideal is just do reset and force-push.

Revert unwanted commits

If you want some of the newest commits but want to remove older ones you can just revert the commit with git revert MERGE_PR_COMMIT_HASH. Please have in mind that in case your merge commit contains a commit with a breaking change flag, you need to revert that commit BEFORE reverting the PR merge commit.

Git flow

develop & next tags

All pull requests should point to the develop branch. Everytime it is updated, a new next version is created and released to npm using the latest commit sha.

main & release candidates

Everytime we want to push things to main, we should create a pull request from develop to main. When that PR is opened/updated, a comment will be added/updated containing the changelog that will be generated by merging that PR. This is useful for knowing whats going to be released if we decide to press the merge button. By doing that, a release candidate tag is created and flagged with the rc tag on npm. Also, a merge back pull request is created from main to develop.

Graduating release candidates to production

Once the release candidate is well tested and approved, the manual release workflow can be triggered through the Github actions UI. It should always be pointed to main and it will graduate the latest release candidate to an actual release, flagging it with the latest tag on npm. Also, a merge back pull request is created from main to develop.