Release Principle - InsureMO/rainbow-d9 GitHub Wiki
Release and Branch
- When a version released,
- Create a release command tag on any branch, command tag syntax should be one of follows:
x.y.z-alpha
,x.y.z-alpha.n
: Alpha version, alpha tag in NPM,x.y.z-beta
,x.y.z-beta.n
: Beta version, beta tag in NPM,x.y.z-canary
,x.y.z-canary.n
: Canary version, canary tag in NPM,x.y.z-nightly
,x.y.z-nightly.n
: Nightly build version, nightly tag in NPM,x.y.z
: GA version, latest in NPM,n
should start from1
, and follows semantic rule on major/minor/patch version of NPM,
- Corresponding release branch
release/{tag}/{version}
will be created,- Tag could be one of:
alpha
,beta
,canary
,nightly
,- Not specified in release command tag, equals
ga
, equals to latest of NPM.
- Version semantic as
major.minor
,
- Tag could be one of:
- A release version tag will be created,
- Create a release command tag on any branch, command tag syntax should be one of follows:
- When a patch needs to be applied, a new branch should be created based on corresponding release branch, for example,
- The last version of
1.3
series is1.3.1
, then there should be a branch which isrelease/ga/1.3
, - Create patch branch based on branch
release/ga/1.3
, assume the name ispatch-1.3
, - Fix the issue and test it,
- Add a new tag
r-1.3.2
ontopatch-1.3
, - Release CI will do the following,
- Align version to
1.3.2
, - Merge all changes to branch
release/ga/1.3
, - Publish to NPM,
- Create Github Release Version,
- Create release version tag.
- Align version to
Manually merge
release/ga/1.3
tomain
, it can be done anytime after1.3.2
released. However, it is recommended that it should be happened before next patch version on1.3
or any other major/minor version released. - The last version of
- When a major/minor needs to be applied, a new branch should be created based on corresponding release branch, for example,
- The last version of
1.3
, - Create feature branch based on branch
main
, assume the name isfeature-a
, - Finish the feature and test it,
- Add a new tag
r-1.4.0
ontofeature-a
, - Release CI will do the following,
- Align version to
1.4.0
, - Create branch
release/ga/1.4
, merge all changes to it, - Publish to NPM,
- Create Github Release Version,
- Create release version tag.
- Align version to
Manually merge
release/ga/1.4
tomain
, it can be done anytime after1.4.1
released. However, it is recommended that it should be happened before next patch version on1.4
or any other major/minor version released. - The last version of
- Use alpha versions,
- Alpha version could be used to test when need to, with tag
r-1.3.2-alpha.x
, x starts from 1, - If tested on alpha version, deploy the ga version based on alpha branch, which should be
release/alpha/1.3
,release/alpha/1.4
, ....
- Alpha version could be used to test when need to, with tag
Actions Flow
Build
Release
Supported tag pattern:
- r-[0-9]+.[0-9]+.[0-9]+-alpha
- r-[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+
- r-[0-9]+.[0-9]+.[0-9]+-beta
- r-[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+
- r-[0-9]+.[0-9]+.[0-9]+-canary
- r-[0-9]+.[0-9]+.[0-9]+-canary.[0-9]+
- r-[0-9]+.[0-9]+.[0-9]+-nightly
- r-[0-9]+.[0-9]+.[0-9]+-nightly.[0-9]+
- r-[0-9]+.[0-9]+.[0-9]
Will release the corresponding version to npm tag, or to latest if there no tag aligned.
flowchart TB
crv([Compute Release Version]) --> cprbn([Compute Pre-release Branch Name, with Major/Minor version])
cprbn --> crbn([Compute Release Branch Name, with Major/Minor version])
crbn --> amv1([Align Module Version for d9-n1])
crbn --> amv2([Align Module Version for d9-n2])
crbn --> amv3([Align Module Version for d9-n3])
amv1 --> cbwpt([Create/Push to Pre-release Branch with Pre-release Version Tag])
amv2 --> cbwpt
amv3 --> cbwpt
cbwpt --> np1([Publish d9-n1 to NPM])
cbwpt --> np2([Publish d9-n2 to NPM])
cbwpt --> np3([Publish d9-n3 to NPM])
cbwpt --> dtt([Drop Trigger Tag])
np1 --> cbwt([Create/Push to Release Branch with Release Version Tag])
np2 --> cbwt([Create/Push to Release Branch with Release Version Tag])
np3 --> cbwt([Create/Push to Release Branch with Release Version Tag])
cbwt --> dpb([Drop Pre-release Branch and Pre-release Version Tag])
cbwt --> crwt([Create Github Release Package with Release Version Tag])
style crv fill: #DAE8FC, stroke: #666, stroke-width: 1px
style cprbn fill: #DAE8FC, stroke: #666, stroke-width: 1px
style crbn fill: #DAE8FC, stroke: #666, stroke-width: 1px
style amv1 fill: #FBE6CF, stroke: #666, stroke-width: 1px
style amv2 fill: #FBE6CF, stroke: #666, stroke-width: 1px
style amv3 fill: #FBE6CF, stroke: #666, stroke-width: 1px
style cbwpt fill: #FBE6CF, stroke: #666, stroke-width: 1px
style np1 fill: #D5E8D4, stroke: #666, stroke-width: 1px
style np2 fill: #D5E8D4, stroke: #666, stroke-width: 1px
style np3 fill: #D5E8D4, stroke: #666, stroke-width: 1px
style dtt fill: #F8CECC, stroke: #666, stroke-width: 1px
style cbwt fill: #FBE6CF, stroke: #666, stroke-width: 1px
style dpb fill: #F8CECC, stroke: #666, stroke-width: 1px
style crwt fill: #D5E8D4, stroke: #666, stroke-width: 1px