-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathprepare_dev_for_next_release.yml
More file actions
67 lines (54 loc) · 1.71 KB
/
prepare_dev_for_next_release.yml
File metadata and controls
67 lines (54 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Prepare dev branch for next release
on:
workflow_run:
workflows: ['Release Package']
types: [completed]
permissions:
contents: write
jobs:
update-pods:
name: Update Podfile.lock after release
runs-on: macos-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' && startsWith(github.event.workflow_run.head_commit.message, 'release:') }}
env:
XCODE_VERSION: latest-stable
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
ref: main
- name: Setup
uses: ./.github/actions/setup
- name: Install CocoaPods
working-directory: example
run: yarn ios:pods
- name: Commit updated Podfile.lock
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add example/ios/Podfile.lock
if git diff --cached --quiet; then
echo "No Podfile.lock changes."
exit 0
fi
git commit -m "chore(example): update Podfile.lock after release"
git push origin main
sync-dev:
name: Merge main into dev
runs-on: ubuntu-latest
needs: update-pods
steps:
- name: Checkout
uses: actions/checkout@v5.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- name: Fetch all branches
run: git fetch --all
- name: Fast-forward dev with main
run: |
git checkout dev
git merge origin/main --ff-only
git push origin dev