From 8fe510752f150a34be4409f474ca7de0746b7b18 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 29 Jul 2024 18:51:21 -0400 Subject: [PATCH] [ci] Cleanup more references to circleci ghstack-source-id: 85a5f17b2b9dee35bb747ce2da13bffaed0fa34a Pull Request resolved: https://github.com/facebook/react/pull/30509 --- ReactVersions.js | 2 +- dangerfile.js | 2 +- scripts/release/README.md | 2 +- scripts/release/utils.js | 19 +------------------ scripts/tasks/eslint.js | 1 - 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/ReactVersions.js b/ReactVersions.js index 8fb7586ec8..736d6c8f54 100644 --- a/ReactVersions.js +++ b/ReactVersions.js @@ -25,7 +25,7 @@ const ReactVersion = '19.0.0'; // choose to change it to "alpha", "beta", "rc", etc. // // It only affects the label used in the version string. To customize the -// npm dist tags used during publish, refer to .circleci/config.yml. +// npm dist tags used during publish, refer to .github/workflows/runtime_prereleases_*.yml. const canaryChannelLabel = 'rc'; // If the canaryChannelLabel is "rc", the build pipeline will use this to build diff --git a/dangerfile.js b/dangerfile.js index c01fa31969..bfc41312e4 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -274,7 +274,7 @@ ${significantResults.join('\n')} writeFileSync('sizebot-message.md', message); markdown( 'The size diff is too large to display in a single comment. ' + - `The [CircleCI job](${process.env.CIRCLE_BUILD_URL}) contains an artifact called 'sizebot-message.md' with the full message.` + `The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.` ); } else { markdown(message); diff --git a/scripts/release/README.md b/scripts/release/README.md index 119d62c6da..3cd042952c 100644 --- a/scripts/release/README.md +++ b/scripts/release/README.md @@ -18,7 +18,7 @@ If this is your first time running the release scripts, go to the `scripts/relea The release process consists of several phases, each one represented by one of the scripts below. A typical release cycle goes like this: -1. When a commit is pushed to the React repo, [Circle CI](https://circleci.com/gh/facebook/react/) will build all release bundles and run unit tests against both the source code and the built bundles. +1. When a commit is pushed to the React repo, [GitHub Actions](https://github.com/facebook/react/actions) will build all release bundles and run unit tests against both the source code and the built bundles. 2. Each weekday, an automated CI cron job publishes prereleases to the `next` and `experimental` channels, from tip of the main branch. 1. You can also [trigger an automated prerelease via the command line](#trigger-an-automated-prerelease), instead of waiting until the next time the cron job runs. 2. For advanced cases, you can [**manually prepare and publish to the `next` channel**](#publishing-release) using the [`prepare-release-from-ci`](#prepare-release-from-ci) and [`publish`](#publish) scripts; or to the [**`experimental` channel**](#publishing-an-experimental-release) using the same scripts (but different build artifacts). diff --git a/scripts/release/utils.js b/scripts/release/utils.js index 2066ac2fe3..10b3a9e91b 100644 --- a/scripts/release/utils.js +++ b/scripts/release/utils.js @@ -5,7 +5,6 @@ const {createPatch} = require('diff'); const {hashElement} = require('folder-hash'); const {existsSync, readFileSync, writeFileSync} = require('fs'); const {readJson, writeJson} = require('fs-extra'); -const fetch = require('node-fetch'); const logUpdate = require('log-update'); const {join} = require('path'); const createLogger = require('progress-estimator'); @@ -58,17 +57,6 @@ const extractCommitFromVersionNumber = version => { return match[2]; }; -const getArtifactsList = async buildID => { - const headers = {}; - const {CIRCLE_CI_API_TOKEN} = process.env; - if (CIRCLE_CI_API_TOKEN != null) { - headers['Circle-Token'] = CIRCLE_CI_API_TOKEN; - } - const jobArtifactsURL = `https://circleci.com/api/v1.1/project/github/facebook/react/${buildID}/artifacts`; - const jobArtifacts = await fetch(jobArtifactsURL, {headers}); - return jobArtifacts.json(); -}; - const getBuildInfo = async () => { const cwd = join(__dirname, '..', '..'); @@ -86,10 +74,6 @@ const getBuildInfo = async () => { ? `0.0.0-experimental-${commit}-${dateString}` : `0.0.0-${commit}-${dateString}`; - // Only available for Circle CI builds. - // https://circleci.com/docs/2.0/env-vars/ - const buildNumber = process.env.CIRCLE_BUILD_NUM; - // React version is stored explicitly, separately for DevTools support. // See updateVersionsForNext() below for more info. const packageJSON = await readJson( @@ -99,7 +83,7 @@ const getBuildInfo = async () => { ? `${packageJSON.version}-experimental-${commit}-${dateString}` : `${packageJSON.version}-${commit}-${dateString}`; - return {branch, buildNumber, checksum, commit, reactVersion, version}; + return {branch, checksum, commit, reactVersion, version}; }; const getChecksumForCurrentRevision = async cwd => { @@ -275,7 +259,6 @@ module.exports = { addDefaultParamValue, confirm, execRead, - getArtifactsList, getBuildInfo, getChecksumForCurrentRevision, getCommitFromCurrentBuild, diff --git a/scripts/tasks/eslint.js b/scripts/tasks/eslint.js index a41bf285c9..6a01f88e98 100644 --- a/scripts/tasks/eslint.js +++ b/scripts/tasks/eslint.js @@ -12,7 +12,6 @@ const runESLint = require('../eslint'); async function main() { console.log('Linting all files...'); - // https://circleci.com/docs/2.0/env-vars/#circleci-environment-variable-descriptions if (!process.env.CI) { console.log('Hint: run `yarn linc` to only lint changed files.'); }