-
Notifications
You must be signed in to change notification settings - Fork 3
Alpha Release Strategy
This workflow is for making sure that we can:
- release the alpha version without any SDK user implicitly downloading it
- patch the alpha version automatically without SDK regeneration
- avoid publishing conflicts with other core library developers
When releasing the feature for the first time:
- Create a feature branch and commit and push your changes.
- Create a PR with
alphaas the base branch. Get it approved and merged. - Run the
Releaseaction onalphabranch with theprereleaseoption.
When releasing an update to the feature:
- Create a PR with
alphaas the base branch. Get it approved and merged. - Run the
Releaseaction onalphabranch with theprereleaseoption.
When merging changes from master branch that you want to release:
- Create a new feature branch with changes from master and create a PR with
alphabase branch. You may get merge conflicts. - For the versions in the
package-lock.jsonandpackage.json, match the versions inalpha. In other words, the version should not be changed inpackage.jsononalphabranch. - Run the
Releaseaction onalphabranch with theprereleaseoption.
When preparing for production release:
- Create PR for
alphaand update all the versions in thepackage-lock.jsonandpackage.jsonfiles so that they match master just like a brand new feature branch. - Create PR from
alphatomaster - Merge your PR into master
- Release as normal(
patch,minorormajor). Do not useprerelease.
The action will publish all the changed libraries with a "prepatch" version. In other words, if the master branch was at 0.3.3 when you created a feature branch from it, the action will publish 0.3.4-alpha.0.
The next action runs on the alpha branch will bump the alpha version. For example, 0.3.4-alpha.0 will become 0.3.4-alpha.1 and so on.
The SDK won't use alpha versions until you explicitly say so. Update the version specifier that is generated to allow only alpha releases in the next patch version.
For example, if it was "^0.3.2", change it to ">=0.3.3-alpha.0 <0.3.3".
Why the <0.3.3 constraint? In our example, the latest master branch version is 0.3.2. So if someone releases a patch in the master branch before the feature branch is closed, it might break the SDK.
Remember to change it back to the latest version in CodeGen when you're done with the alpha versions. For example, if the master branch is using 0.3.4, change CodeGen back to using "^0.3.4".