|
| 1 | +name: facebook/react/publish_preleases_nightly |
| 2 | +on: |
| 3 | + schedule: |
| 4 | + - cron: 10 16 * * 1,2,3,4,5 |
| 5 | +# # 'filters' was not transformed because there is no suitable equivalent in GitHub Actions |
| 6 | + workflow_dispatch: |
| 7 | + inputs: |
| 8 | + prerelease_commit_sha: |
| 9 | + required: true |
| 10 | +env: |
| 11 | + CIRCLE_CI_API_TOKEN: xxxx6989 |
| 12 | + NPM_TOKEN: xxxxJBvP |
| 13 | +jobs: |
| 14 | + publish_to_canary_channel: |
| 15 | + if: inputs.prerelease_commit_sha == '' |
| 16 | + runs-on: ubuntu-latest |
| 17 | + env: |
| 18 | + TZ: "/usr/share/zoneinfo/America/Los_Angeles" |
| 19 | + commit_sha: "${{ github.sha }}" |
| 20 | + release_channel: stable |
| 21 | + dist_tag: canary,next |
| 22 | + steps: |
| 23 | + |
| 24 | + - uses: actions/setup-node@v4 |
| 25 | + with: |
| 26 | + node-version-file: '.nvmrc' |
| 27 | + cache: 'yarn' |
| 28 | + - name: Install dependencies |
| 29 | + run: yarn install --frozen-lockfile |
| 30 | + env: |
| 31 | + ELECTRON_SKIP_BINARY_DOWNLOAD: "1" |
| 32 | + shell: bash |
| 33 | + - name: Run publish script |
| 34 | + run: |- |
| 35 | + git fetch origin main |
| 36 | + cd ./scripts/release && yarn && cd ../../ |
| 37 | + scripts/release/prepare-release-from-ci.js --skipTests -r ${{ env.release_channel }} --commit=${{ env.commit_sha }} |
| 38 | + cp ./scripts/release/ci-npmrc ~/.npmrc |
| 39 | + scripts/release/publish.js --ci --tags ${{ env.dist_tag }} |
| 40 | + publish_to_experimental_channel: |
| 41 | + if: inputs.prerelease_commit_sha == '' |
| 42 | + runs-on: ubuntu-latest |
| 43 | + needs: |
| 44 | + - publish_to_canary_channel |
| 45 | + env: |
| 46 | + TZ: "/usr/share/zoneinfo/America/Los_Angeles" |
| 47 | + commit_sha: "${{ github.sha }}" |
| 48 | + release_channel: experimental |
| 49 | + dist_tag: experimental |
| 50 | + steps: |
| 51 | + |
| 52 | + - uses: actions/setup-node@v4 |
| 53 | + with: |
| 54 | + node-version-file: '.nvmrc' |
| 55 | + cache: 'yarn' |
| 56 | + - name: Install dependencies |
| 57 | + run: yarn install --frozen-lockfile |
| 58 | + env: |
| 59 | + ELECTRON_SKIP_BINARY_DOWNLOAD: "1" |
| 60 | + shell: bash |
| 61 | + - name: Run publish script |
| 62 | + run: |- |
| 63 | + git fetch origin main |
| 64 | + cd ./scripts/release && yarn && cd ../../ |
| 65 | + scripts/release/prepare-release-from-ci.js --skipTests -r ${{ env.release_channel }} --commit=${{ env.commit_sha }} |
| 66 | + cp ./scripts/release/ci-npmrc ~/.npmrc |
| 67 | + scripts/release/publish.js --ci --tags ${{ env.dist_tag }} |
0 commit comments