From d5f0d8321fe59f614ec676107ecdc78e3743040b Mon Sep 17 00:00:00 2001 From: Luna Wei Date: Thu, 11 Nov 2021 00:13:13 -0800 Subject: [PATCH] Testing --- .circleci/config.yml | 59 ++++++++++++++++++++++++++++++-------------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0f91a2531760a2..80cbf5ec5a9453 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -772,34 +772,55 @@ jobs: git config --global user.email "react-native-bot@users.noreply.github.com" git config --global user.name "npm Deployment Script" echo "machine github.com login react-native-bot password $GITHUB_TOKEN" > ~/.netrc - - run: node ./scripts/publish-npm.js << parameters.publish_npm_args >> + # - run: node ./scripts/publish-npm.js << parameters.publish_npm_args >> + # - when: + # condition: + # equal: [ --dry-run, << parameters.publish_npm_args >> ] + # steps: + # - run: + # name: Build release package as a job artifact + # command: | + # mkdir -p build + # FILENAME=$(npm pack) + # mv $FILENAME build/ + # echo $FILENAME > build/react-native-package-version + # - store_artifacts: + # path: ~/react-native/build/ + # destination: build + # - persist_to_workspace: + # root: . + # paths: + # - build/* + + # - when: + # condition: + # matches: { pattern: '^pull\/.*$', value: << pipeline.git.branch >> } + # steps: + # - install_github_bot_deps + # - run: + # name: Post link to PR build artifacts (pull-bot) + # command: GITHUB_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" scripts/circleci/post-artifacts-link.sh || true + - when: condition: - equal: [ --dry-run, << parameters.publish_npm_args >> ] + matches: { pattern: '^pull\/.*$', value: << pipeline.git.branch >> } steps: - run: - name: Build release package as a job artifact + name: Temporary test and update to 0.67.0-rc.3 command: | - mkdir -p build - FILENAME=$(npm pack) - mv $FILENAME build/ - echo $FILENAME > build/react-native-package-version - - store_artifacts: - path: ~/react-native/build/ - destination: build - - persist_to_workspace: - root: . - paths: - - build/* + echo $PAT_USERNAME - when: condition: - matches: { pattern: '^pull\/.*$', value: << pipeline.git.branch >> } + equal: [ --release, << parameters.publish_npm_args >> ] steps: - - install_github_bot_deps - run: - name: Post link to PR build artifacts (pull-bot) - command: GITHUB_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" scripts/circleci/post-artifacts-link.sh || true + name: Update rn-diff-purge to generate upgrade-support diff + command: | + curl -X POST https://api.github.com/repos/react-native-community/rn-diff-purge/dispatches \ + -H "Accept: application/vnd.github.v3+json" \ + -u "$PAT_USERNAME:$PAT_TOKEN" \ + -d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${CIRCLE_TAG:1}\" }}" # ------------------------- # JOBS: Nightly @@ -824,6 +845,7 @@ workflows: - build_npm_package: # Build a release package on every untagged commit, but do not publish to npm. publish_npm_args: --dry-run + context: react-native-bot filters: branches: only: @@ -899,6 +921,7 @@ workflows: jobs: - build_npm_package: name: build_and_publish_npm_package + context: react-native-bot publish_npm_args: --release filters: # Both of the following conditions must be included!