This repository has been archived by the owner on Nov 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 957
143 lines (114 loc) · 4.35 KB
/
publish-pods.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Publish Pods
# This action runs on 'git push tag v*'
on:
push:
tags:
- v*
workflow_dispatch:
jobs:
publish_flipper_pod:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3.5.3
- name: Install Dependences
run: pod repo update
- name: Pod Version
run: pod --version
- name: Update Flipper version
run: ./scripts/update-pod-versions.sh ./ ./Flipper.podspec
- name: Push Flipper
run: ./scripts/publish-flipper-pods.sh ./ Flipper
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
publish_flipperkit_pod:
needs: publish_flipper_pod
runs-on: macos-latest
steps:
- uses: actions/checkout@v3.5.3
- name: Install Dependences
run: pod repo update
- name: Pod Version
run: pod --version
- name: Update FlipperKit version
run: ./scripts/update-pod-versions.sh ./ ./FlipperKit.podspec
- name: Push FlipperKit
run: ./scripts/publish-flipper-pods.sh ./ FlipperKit
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
create_pr:
needs: publish_flipperkit_pod
runs-on: macos-latest
steps:
- uses: actions/checkout@v3.5.3
- name: Update Flipper's Podspec
run: ./scripts/update-pod-versions.sh ./ ./Flipper.podspec
- name: Update FlipperKit's Podspec
run: ./scripts/update-pod-versions.sh ./ ./FlipperKit.podspec
- name: Update Tutorial's Podfile
run: ./scripts/update-pod-versions.sh ./ ./iOS/Tutorial/Podfile
- name: Update Getting Started
run: ./scripts/update-pod-versions.sh ./ ./docs/getting-started/ios-native.mdx
- name: Update RN getting started guide
run: ./scripts/update-pod-versions.sh ./ ./docs/getting-started/react-native-ios.mdx
- name: Update ReactNativeFlipperExample
run: ./scripts/update-pod-versions.sh ./ ./react-native/ReactNativeFlipperExample/ios/Podfile
- name: Install Dependencies
run: pod repo update
- name: Pod Version
run: pod --version
- name: Update Sample's Podfile.lock
run: |
cd iOS/Sample/
pod update
ls
- name: Update SampleSwift's Podfile.lock
run: |
cd iOS/SampleSwift/
pod update
ls
- name: Update Tutorial's Podfile.lock
run: |
cd iOS/Tutorial/
# Retrying an update, as Flipper and FlipperKit pod may take time to get updated on CocoaPods. Putting this hack unless we have cocoapods 1.10. More information related to the bug /~https://github.com/CocoaPods/CocoaPods/issues/9502#issuecomment-579486258
for i in {1..20}; do pod update && break || sleep 30; done
ls
- name: Update ReactNativeFlipperExample Podfile.lock
run: |
cd react-native/ReactNativeFlipperExample
yarn install
cd ios
pod update --repo-update
ls
# Followed this /~https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#creating-pull-requests-on-tag-push
- name: Create a temporary tag branch
run: |
git config --global user.name 'GitHub'
git config --global user.email 'noreply@github.com'
git checkout -b temp-${GITHUB_REF:10}
git push --set-upstream origin temp-${GITHUB_REF:10}
- name: Git status
run: |
git status
- name: Git diff
run: |
git diff
- name: Git branch
run: |
git branch
- name: Create PR to Update Podfile.lock
uses: peter-evans/create-pull-request@v5.0.2
with:
title: "Automated: Update Podfile.lock"
body: |
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](/~https://github.com/peter-evans/create-pull-request)
base: "main"
branch-suffix: short-commit-hash
labels: automated pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Delete tag branch
run: |
git push --delete origin temp-${GITHUB_REF:10}