-
Notifications
You must be signed in to change notification settings - Fork 47k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Add prerelease nightly and manual script for compiler
Publishes the compiler packages on the same schedule as the React ones. For now the manual script can only build from `main` but in the future we can add support for building specific commits ghstack-source-id: 66676c578b795b90bf3c5715be8900438868b6ee Pull Request resolved: #30615
- Loading branch information
Showing
4 changed files
with
93 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: (Compiler) Publish Prereleases | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
commit_sha: | ||
required: true | ||
default: '' | ||
type: string | ||
release_channel: | ||
required: true | ||
type: string | ||
dist_tag: | ||
required: true | ||
type: string | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
env: | ||
TZ: /usr/share/zoneinfo/America/Los_Angeles | ||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout | ||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1 | ||
GH_TOKEN: ${{ github.token }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
defaults: | ||
run: | ||
working-directory: compiler | ||
|
||
jobs: | ||
publish_prerelease: | ||
name: Publish prelease (${{ inputs.release_channel }}) ${{ inputs.commit_sha }} @${{ inputs.dist_tag }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: yarn | ||
cache-dependency-path: compiler/yarn.lock | ||
- name: Restore cached node_modules | ||
uses: actions/cache@v4 | ||
id: node_modules | ||
with: | ||
path: "**/node_modules" | ||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('compiler/**/yarn.lock') }} | ||
- run: yarn install --frozen-lockfile | ||
- run: | | ||
cp ./scripts/release/ci-npmrc ~/.npmrc | ||
scripts/release/publish.js --ci --tags ${{ inputs.dist_tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: (Compiler) Publish Prereleases Manual | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
prerelease_commit_sha: | ||
required: false | ||
|
||
env: | ||
TZ: /usr/share/zoneinfo/America/Los_Angeles | ||
|
||
jobs: | ||
publish_prerelease_experimental: | ||
name: Publish to Experimental channel | ||
uses: facebook/react/.github/workflows/compiler_prereleases.yml@main | ||
with: | ||
commit_sha: ${{ inputs.prerelease_commit_sha || github.sha }} | ||
release_channel: experimental | ||
dist_tag: experimental | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: (Compiler) Publish Prereleases Nightly | ||
|
||
on: | ||
schedule: | ||
# At 10 minutes past 16:00 on Mon, Tue, Wed, Thu, and Fri | ||
- cron: 10 16 * * 1,2,3,4,5 | ||
|
||
env: | ||
TZ: /usr/share/zoneinfo/America/Los_Angeles | ||
|
||
jobs: | ||
publish_prerelease_experimental: | ||
name: Publish to Experimental channel | ||
uses: facebook/react/.github/workflows/compiler_prereleases.yml@main | ||
with: | ||
commit_sha: ${{ github.sha }} | ||
release_channel: experimental | ||
dist_tag: experimental | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |