mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Update CircleCI to auto-deploy release branch on push
Summary:
Changelog: [Internal] Update CircleCI to auto-deploy release branch on push
This work is part of an effort to automate the release process by using a push to a release branch as a trigger to prepare, package and deploy react-native to npm from CircleCI
The following diagram describes the context (what kind of releases we do, relevant scripts and what they do), the pre-existing process for the different types of release and how I've modified the process.
{F683387103}
This diff updates the relevant CircleCI workflows
Reviewed By: sota000
Differential Revision: D32702420
fbshipit-source-id: e20cdeb53eb4a8ce7e54e083e3e14bd89e11b789
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f4314c2b44
commit
94abcffe2f
+20
-1
@@ -749,6 +749,17 @@ jobs:
|
||||
# -------------------------
|
||||
# JOBS: Releases
|
||||
# -------------------------
|
||||
prepare_package_for_release:
|
||||
executor: reactnativeios
|
||||
steps:
|
||||
- add_ssh_keys:
|
||||
fingerprints:
|
||||
- "1c:98:e0:3a:52:79:95:29:12:cd:b4:87:5b:41:e2:bb"
|
||||
- run:
|
||||
name: "Set new react-native version and commit changes"
|
||||
command: |
|
||||
node ./scripts/prepare-package-for-release.js
|
||||
|
||||
build_npm_package:
|
||||
parameters:
|
||||
publish_npm_args:
|
||||
@@ -847,7 +858,6 @@ workflows:
|
||||
only:
|
||||
- main
|
||||
- /^pull\/.*$/
|
||||
- /^(\d+)\.(\d+)-stable$/
|
||||
- test_js:
|
||||
run_disabled_tests: false
|
||||
filters:
|
||||
@@ -915,6 +925,15 @@ workflows:
|
||||
|
||||
releases:
|
||||
jobs:
|
||||
# This job will trigger on pushes to release branch and commit a version tag to trigger `build_npm_package` for release
|
||||
- prepare_package_for_release:
|
||||
name: prepare_package_for_release
|
||||
filters:
|
||||
branches:
|
||||
only:
|
||||
- /^(\d+)\.(\d+)-stable$/
|
||||
|
||||
# This job will trigger when a version tag is pushed (by prepare_package_for_release)
|
||||
- build_npm_package:
|
||||
name: build_and_publish_npm_package
|
||||
context: react-native-bot
|
||||
|
||||
@@ -116,9 +116,7 @@ if (dryRunBuild) {
|
||||
// For stable, pre-release releases, we manually call bump-oss-version on release branch
|
||||
if (nightlyBuild || dryRunBuild) {
|
||||
if (
|
||||
exec(
|
||||
`node scripts/bump-oss-version.js --nightly --to-version ${releaseVersion}`,
|
||||
).code
|
||||
exec(`node scripts/set-rn-version.js --to-version ${releaseVersion}`).code
|
||||
) {
|
||||
echo('Failed to bump version number');
|
||||
exit(1);
|
||||
|
||||
Reference in New Issue
Block a user