Skip to content

Commit 0f1ec18

Browse files
committed
convert circleci workflow publish_preleases to github actions
1 parent 00a160e commit 0f1ec18

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: facebook/react/publish_preleases
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
prerelease_commit_sha:
6+
required: true
7+
env:
8+
CIRCLE_CI_API_TOKEN: xxxx6989
9+
NPM_TOKEN: xxxxJBvP
10+
jobs:
11+
publish_to_canary_channel:
12+
if: ${{ inputs.prerelease_commit_sha }}
13+
runs-on: ubuntu-latest
14+
container:
15+
image: cimg/openjdk:18.0-node
16+
env:
17+
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
18+
commit_sha: "${{ inputs.prerelease_commit_sha }}"
19+
release_channel: stable
20+
dist_tag: canary,next
21+
steps:
22+
- uses: actions/[email protected]
23+
- name: Install dependencies
24+
run: yarn install --frozen-lockfile
25+
env:
26+
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
27+
shell: bash
28+
- name: Run publish script
29+
run: |-
30+
git fetch origin main
31+
cd ./scripts/release && yarn && cd ../../
32+
scripts/release/prepare-release-from-ci.js --skipTests -r ${{ env.release_channel }} --commit=${{ env.commit_sha }}
33+
cp ./scripts/release/ci-npmrc ~/.npmrc
34+
scripts/release/publish.js --ci --tags ${{ env.dist_tag }}
35+
publish_to_experimental_channel:
36+
if: ${{ inputs.prerelease_commit_sha }}
37+
runs-on: ubuntu-latest
38+
container:
39+
image: cimg/openjdk:18.0-node
40+
needs:
41+
- publish_to_canary_channel
42+
env:
43+
TZ: "/usr/share/zoneinfo/America/Los_Angeles"
44+
commit_sha: "${{ inputs.prerelease_commit_sha }}"
45+
release_channel: experimental
46+
dist_tag: experimental
47+
steps:
48+
- uses: actions/[email protected]
49+
- name: Install dependencies
50+
run: yarn install --frozen-lockfile
51+
env:
52+
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
53+
shell: bash
54+
- name: Run publish script
55+
run: |-
56+
git fetch origin main
57+
cd ./scripts/release && yarn && cd ../../
58+
scripts/release/prepare-release-from-ci.js --skipTests -r ${{ env.release_channel }} --commit=${{ env.commit_sha }}
59+
cp ./scripts/release/ci-npmrc ~/.npmrc
60+
scripts/release/publish.js --ci --tags ${{ env.dist_tag }}

0 commit comments

Comments
 (0)