Skip to content

Commit 7f550e2

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Bump Podfile.lock automatically (#50345)
Summary: This workflow bumps the Podfile.lock automatically when a new release happens. I decided not to use a js script in this case because all the commands are bash commands for git or cocoapods, therefore wrapping them all in a JS file would have added little to no benefit and only overheads. ## Changelog: [Internal] - Bumps podfile.lock automatically Pull Request resolved: #50345 Test Plan: GHA - tested as a separate workflow first, hardcoding the latest RC https://github.com/facebook/react-native/actions/runs/14127895380/job/39581024861?pr=50345 The flow correctly fails as the Podfile.lock has already been bumped in the release branch. Reviewed By: fabriziocucci Differential Revision: D72050261 Pulled By: cipolleschi fbshipit-source-id: 5c0666e80b037319c365fcf4d52e8e367c3445ea
1 parent 6b72fd2 commit 7f550e2

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

Diff for: .github/workflows/bump-podfile-lock.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Bump Podfile.lock
2+
3+
on:
4+
workflow_call: # this directive allow us to call this workflow from other workflows
5+
6+
jobs:
7+
bump-podfile-lock:
8+
runs-on: macos-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
fetch-tags: true
15+
- name: Install dependencies
16+
uses: ./.github/actions/yarn-install
17+
- name: Configure git
18+
run: |
19+
git config --local user.email "[email protected]"
20+
git config --local user.name "React Native Bot"
21+
- name: Extract branch name
22+
run: |
23+
TAG="${{ github.ref_name }}";
24+
BRANCH_NAME=$(echo "$TAG" | sed -E 's/v([0-9]+\.[0-9]+)\.[0-9]+(-rc\.[0-9]+)?/\1-stable/')
25+
echo "Branch Name is $BRANCH_NAME"
26+
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
27+
- name: Checkout release branch
28+
run: |
29+
git checkout "$BRANCH_NAME"
30+
git fetch
31+
git pull origin "$BRANCH_NAME"
32+
- name: Bump podfile.lock
33+
run: |
34+
cd packages/rn-tester
35+
bundle install
36+
bundle exec pod update hermes-engine --no-repo-update
37+
- name: Commit changes
38+
run: |
39+
git add packages/rn-tester/Podfile.lock
40+
git commit -m "[LOCAL] Bump Podfile.lock"
41+
git push origin "$BRANCH_NAME"

Diff for: .github/workflows/publish-release.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,12 @@ jobs:
238238
const version = "${{ github.ref_name }}";
239239
await verifyArtifactsAreOnMaven(version);
240240
241-
create_changelog:
241+
generate_changelog:
242242
needs: build_npm_package
243243
uses: ./.github/workflows/generate-changelog.yml
244244
secrets: inherit
245+
246+
bump-podfile-lock:
247+
needs: build_npm_package
248+
uses: ./.github/workflows/bump-podfile-lock.yml
249+
secrets: inherit

0 commit comments

Comments
 (0)