Skip to content

Commit 90d4d55

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Port Create Release fixes from Stable to main (facebook#45063)
Summary: Pull Request resolved: facebook#45063 While doing the release of 0.75, we have to fix the Create Release action a few times to get it right. This change contains the fixes from * facebook@e36b46f * facebook@1b89135 * facebook@56e1c8b * facebook@0359131 * facebook@5280977 * facebook@f4b1dd1 ## Changelog [Internal] - Backport changes to Create Release github action Reviewed By: cortinico Differential Revision: D58782391 fbshipit-source-id: b68088fb8c4290efcb4599d1b090b18e401e4b66
1 parent b04d0d0 commit 90d4d55

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

.github/actions/create-release/action.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
name: create_release
22
description: Creates a new React Native release
3+
inputs:
4+
version:
5+
description: 'The version of React Native we want to release. For example 0.75.0-rc.0'
6+
required: true
7+
is_latest_on_npm:
8+
description: 'Whether we want to tag this release as latest on NPM'
9+
required: true
10+
default: "false"
11+
dry_run:
12+
description: 'Whether the job should be executed in dry-run mode or not'
13+
default: "true"
314
runs:
415
using: composite
516
steps:
617
- name: Yarn install
718
shell: bash
819
run: yarn install --non-interactive
20+
- name: Configure Git
21+
shell: bash
22+
run: |
23+
git config --local user.email "[email protected]"
24+
git config --local user.name "React Native Bot"
925
- name: Creating release commit
1026
shell: bash
1127
run: |
@@ -23,7 +39,7 @@ runs:
2339
git tag -a "latest" -m "latest"
2440
- name: Pushing release commit
2541
shell: bash
26-
if: ${{ inputs.dry_run == false }}
42+
if: ${{ inputs.dry_run == 'false' }}
2743
run: |
2844
CURR_BRANCH="$(git branch --show-current)"
2945
git push origin "$CURR_BRANCH" --follow-tags

.github/workflows/create-release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ on:
1818
default: false
1919

2020
jobs:
21-
prepare_release:
21+
create_release:
2222
runs-on: ubuntu-latest
2323
steps:
2424
- name: Checkout
2525
uses: actions/[email protected]
26+
with:
27+
token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
2628
- name: Check if on stable branch
2729
id: check_stable_branch
2830
run: |
@@ -46,3 +48,7 @@ jobs:
4648
- name: Execute Prepare Release
4749
if: ${{ steps.check_stable_branch.outputs.ON_STABLE_BRANCH && !steps.check_if_tag_exists.outputs.TAG_EXISTS }}
4850
uses: ./.github/actions/create-release
51+
with:
52+
version: ${{ inputs.version }}
53+
is_latest_on_npm: ${{ inputs.is_latest_on_npm }}
54+
dry_run: ${{ inputs.dry_run }}

0 commit comments

Comments
 (0)