Skip to content

Commit 26df301

Browse files
committed
ci: added next release workflow
1 parent c50ff31 commit 26df301

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Prepare dev branch for next release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'package.json'
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
update-pods:
14+
name: Update Podfile.lock after release
15+
runs-on: macos-latest
16+
if: startsWith(github.event.head_commit.message, 'release:')
17+
env:
18+
XCODE_VERSION: latest-stable
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/[email protected]
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
fetch-depth: 0
26+
27+
- name: Setup
28+
uses: ./.github/actions/setup
29+
30+
- name: Install CocoaPods
31+
working-directory: example
32+
run: yarn ios:pods
33+
34+
- name: Commit updated Podfile.lock
35+
run: |
36+
git config user.name "github-actions[bot]"
37+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
38+
39+
git add example/ios/Podfile.lock
40+
41+
if git diff --cached --quiet; then
42+
echo "No Podfile.lock changes."
43+
exit 0
44+
fi
45+
46+
git commit -m "chore(example): update Podfile.lock after release [skip ci]"
47+
git push
48+
49+
sync-dev:
50+
name: Merge main into dev
51+
runs-on: ubuntu-latest
52+
needs: update-pods
53+
if: startsWith(github.event.head_commit.message, 'release:')
54+
steps:
55+
- name: Checkout
56+
uses: actions/[email protected]
57+
with:
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
fetch-depth: 0
60+
61+
- name: Fetch all branches
62+
run: git fetch --all
63+
64+
- name: Fast-forward dev with main
65+
run: |
66+
git checkout dev
67+
git merge origin/main --ff-only
68+
git push origin dev

0 commit comments

Comments
 (0)