-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cloned_nightly_workflow_dispatch_a1260
- Loading branch information
Showing
355 changed files
with
24,787 additions
and
8,994 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
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
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
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
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
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
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
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,67 @@ | ||
name: Increment Version | ||
on: | ||
workflow_call: | ||
inputs: | ||
increment: | ||
required: true | ||
type: string | ||
dry-run: | ||
required: true | ||
type: boolean | ||
channel: | ||
required: true | ||
type: string | ||
git-repo: | ||
required: true | ||
type: string | ||
secrets: | ||
SSH_KEY: | ||
required: true | ||
outputs: | ||
version: | ||
description: 'The new package.json version, e.g. "0.16.0"' | ||
value: ${{ jobs.release.outputs.version }} | ||
tag-ref: | ||
description: 'The fully qualified ref for the tag, e.g. "refs/tags/v0.16.0"' | ||
value: ${{ jobs.release.outputs.tag-ref }} | ||
latest-release: | ||
description: 'The latest release (per GitHub releases) prior to this increment, e.g. "v0.15.0"' | ||
value: ${{ jobs.release.outputs.latest-release }} | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.increment-version.outputs.version }} | ||
tag-ref: ${{ steps.increment-version.outputs.tag-ref }} | ||
latest-release: ${{ steps.latest.outputs.release }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{ secrets.SSH_KEY }} | ||
fetch-depth: 0 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: | | ||
git config user.name "Lexical GitHub Actions Bot" | ||
git config user.email "<>" | ||
- id: latest | ||
uses: pozetroninc/github-action-get-latest-release@master | ||
with: | ||
owner: facebook | ||
repo: lexical | ||
excludes: draft | ||
- id: increment-version | ||
run: npm run increment-version | ||
env: | ||
# These are passed in the environment as they are used by | ||
# the postversion script | ||
INCREMENT: ${{ inputs.increment }} | ||
CHANNEL: ${{ inputs.channel }} | ||
LATEST_RELEASE: ${{ steps.latest.outputs.release }} | ||
DRY_RUN: ${{ inputs.dry-run && '1' || '' }} | ||
GIT_REPO: ${{ inputs.git-repo }} |
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
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,36 @@ | ||
name: (call) Publish to NPM | ||
on: | ||
workflow_call: | ||
inputs: | ||
ref: | ||
required: true | ||
type: string | ||
dry-run: | ||
required: true | ||
type: boolean | ||
channel: | ||
required: true | ||
type: string | ||
secrets: | ||
NPM_TOKEN: | ||
required: true | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
env: | ||
DRY_RUN_ARG: ${{ inputs.dry-run && '--dry-run' || '' }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: npm ci | ||
- run: npm run prepare-release | ||
- run: node ./scripts/npm/release.js --non-interactive $DRY_RUN_ARG --channel='${{ inputs.channel }}' | ||
env: | ||
NODE_AUTH_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 |
---|---|---|
@@ -1,28 +1,26 @@ | ||
name: Nightly Release Branch | ||
on: | ||
# remove the workflow_dispatch when this is turned on | ||
workflow_dispatch | ||
# Run daily at 2:30am UTC | ||
# schedule: | ||
# - cron: '30 2 * * 1-5' | ||
schedule: | ||
- cron: '30 2 * * 1-5' | ||
jobs: | ||
release: | ||
increment-version: | ||
# prevents this action from running on forks | ||
if: github.repository_owner == 'facebook' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{ secrets.SSH_KEY }} | ||
fetch-depth: 0 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
registry-url: 'https://registry.npmjs.org' | ||
- run: | | ||
git config user.name "Lexical GitHub Actions Bot" | ||
git config user.email "<>" | ||
- run: npm ci | ||
- run: npm run increment-version -- --i prerelease | ||
- run: git push -u [email protected]:facebook/lexical.git --follow-tags | ||
uses: ./.github/workflows/call-increment-version.yml | ||
with: | ||
channel: nightly | ||
increment: prerelease | ||
dry-run: false | ||
git-repo: '[email protected]:facebook/lexical.git' | ||
secrets: | ||
SSH_KEY: ${{ secrets.SSH_KEY }} | ||
npm-release: | ||
uses: ./.github/workflows/call-npm-publish.yml | ||
needs: [increment-version] | ||
with: | ||
ref: ${{ needs.increment-version.outputs.tag-ref }} | ||
dry-run: false | ||
channel: nightly | ||
secrets: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
Oops, something went wrong.