chore: Update CircleCI workflow to include approval step before NPM publish for release branches (#4138)
This commit is contained in:
parent
391ff2243d
commit
fb91c6da69
@ -495,13 +495,18 @@ workflows:
|
|||||||
- BUILD:
|
- BUILD:
|
||||||
filters:
|
filters:
|
||||||
branches:
|
branches:
|
||||||
only: release
|
only: /^release\/.*/
|
||||||
- NPM_PUBLISH:
|
- HOLD_FOR_APPROVAL:
|
||||||
|
type: approval
|
||||||
requires:
|
requires:
|
||||||
- BUILD
|
- BUILD
|
||||||
|
- NPM_PUBLISH:
|
||||||
|
requires:
|
||||||
|
- HOLD_FOR_APPROVAL
|
||||||
- DOCKER_RELEASE_PUBLISH:
|
- DOCKER_RELEASE_PUBLISH:
|
||||||
requires:
|
requires:
|
||||||
- NPM_PUBLISH
|
- NPM_PUBLISH
|
||||||
|
|
||||||
###
|
###
|
||||||
# Unit and E2E tests have already run for PR_CHECKS
|
# Unit and E2E tests have already run for PR_CHECKS
|
||||||
# Re-running should not gain us any confidence here
|
# Re-running should not gain us any confidence here
|
||||||
|
|||||||
@ -19,9 +19,11 @@ async function run() {
|
|||||||
|
|
||||||
let nextVersion;
|
let nextVersion;
|
||||||
|
|
||||||
if (branchName === 'release') {
|
if (branchName.startsWith('release')) {
|
||||||
console.log('Branch: release');
|
console.log('Branch: release');
|
||||||
nextVersion = semver.inc(currentVersion, 'minor');
|
await fs.writeFile('./commit.txt', currentCommitHash);
|
||||||
|
console.log('the version is automatically picked up from the version.txt file');
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
console.log('Branch: master');
|
console.log('Branch: master');
|
||||||
const prereleaseComponents = semver.prerelease(currentVersion);
|
const prereleaseComponents = semver.prerelease(currentVersion);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user