65
65
uses : actions/checkout@v4
66
66
with :
67
67
ref : main
68
+ submodules : true
68
69
# The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify
69
70
# This is a workaround to allow pushes to a protected branch
70
71
token : ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
@@ -75,70 +76,24 @@ jobs:
75
76
with :
76
77
GPG_PASSPHRASE : ${{ secrets.LARGE_SECRET_PASSPHRASE }}
77
78
78
- - name : Generate version
79
+ - name : Generate new E/App version
79
80
id : bumpVersion
80
81
uses : ./.github/actions/javascript/bumpVersion
81
82
with :
82
83
GITHUB_TOKEN : ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
83
84
SEMVER_LEVEL : ${{ inputs.SEMVER_LEVEL }}
84
85
85
- - name : Commit new version
86
- run : |
87
- git add \
88
- ./package.json \
89
- ./package-lock.json \
90
- ./android/app/build.gradle \
91
- ./ios/NewExpensify/Info.plist \
92
- ./ios/NewExpensifyTests/Info.plist \
93
- ./ios/NotificationServiceExtension/Info.plist
94
- git commit -m "Update version to ${{ steps.bumpVersion.outputs.NEW_VERSION }}"
95
-
96
- - name : Update main branch
97
- run : git push origin main
98
-
99
- - name : Announce failed workflow in Slack
100
- if : ${{ failure() }}
101
- uses : ./.github/actions/composite/announceFailedWorkflowInSlack
102
- with :
103
- SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
104
-
105
- createNewHybridVersion :
106
- runs-on : macos-latest
107
- needs : [validateActor, createNewVersion]
108
- if : ${{ fromJSON(needs.validateActor.outputs.HAS_WRITE_ACCESS) }}
109
- steps :
110
- - name : Run turnstyle
111
- uses : softprops/turnstyle@49108bdfa571e62371bd2c3094893c547ab3fc03
112
- with :
113
- poll-interval-seconds : 10
114
- env :
115
- GITHUB_TOKEN : ${{ github.token }}
116
-
117
- - name : Check out `App` repo
118
- uses : actions/checkout@v4
119
- with :
120
- ref : main
121
- submodules : true
122
- # The OS_BOTIFY_COMMIT_TOKEN is a personal access token tied to osbotify
123
- # This is a workaround to allow pushes to a protected branch
124
- token : ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
125
-
126
- - name : Update submodule and checkout the main branch
86
+ - name : Update Mobile-Expensify submodule with the latest state of the Mobile-Expensify main branch
127
87
run : |
128
- git submodule update --init
129
88
cd Mobile-Expensify
89
+ git fetch --depth=1 origin main
130
90
git checkout main
131
- git pull origin main
132
-
133
- - name : Setup git for OSBotify
134
- uses : ./.github/actions/composite/setupGitForOSBotify
135
- id : setupGitForOSBotify
136
- with :
137
- GPG_PASSPHRASE : ${{ secrets.LARGE_SECRET_PASSPHRASE }}
91
+ git reset --hard origin/main
138
92
139
93
- name : Generate HybridApp version
140
94
run : |
141
95
cd Mobile-Expensify
96
+
142
97
# Generate all flavors of the version
143
98
SHORT_APP_VERSION=$(echo "$NEW_VERSION" | awk -F'-' '{print $1}')
144
99
BUILD_NUMBER=$(echo "$NEW_VERSION" | awk -F'-' '{print $2}')
@@ -167,9 +122,9 @@ jobs:
167
122
# Update JS HybridApp Version
168
123
sed -i .bak -E "s/\"version\": \"([0-9\.]*)\"/\"version\": \"$FULL_APP_VERSION\"/" $JS_CONFIG_FILE
169
124
env :
170
- NEW_VERSION : ${{ needs.createNewVersion .outputs.NEW_VERSION }}
125
+ NEW_VERSION : ${{ steps.bumpVersion .outputs.NEW_VERSION }}
171
126
172
- - name : Commit new version
127
+ - name : Commit new Mobile-Expensify version
173
128
run : |
174
129
cd Mobile-Expensify
175
130
git add \
@@ -178,16 +133,25 @@ jobs:
178
133
./iOS/Expensify/Expensify-Info.plist\
179
134
./iOS/SmartScanExtension/Info.plist \
180
135
./iOS/NotificationServiceExtension/Info.plist
181
- git commit -m "Update version to ${{ needs.createNewVersion.outputs.NEW_VERSION }}"
136
+ git commit -m "Update version to ${{ steps.bumpVersion.outputs.NEW_VERSION }}"
137
+ git push origin main
182
138
183
- - name : Update main branch on Mobile-Expensify and App
139
+ - name : Commit new E/App version
140
+ run : |
141
+ git add \
142
+ ./package.json \
143
+ ./package-lock.json \
144
+ ./android/app/build.gradle \
145
+ ./ios/NewExpensify/Info.plist \
146
+ ./ios/NewExpensifyTests/Info.plist \
147
+ ./ios/NotificationServiceExtension/Info.plist
148
+ git commit -m "Update version to ${{ steps.bumpVersion.outputs.NEW_VERSION }}"
149
+
150
+ - name : Update Mobile-Expensify submodule in E/App
184
151
run : |
185
- cd Mobile-Expensify
186
- git push origin main
187
- cd ..
188
152
git add Mobile-Expensify
189
- git commit -m "Update Mobile-Expensify to ${{ needs.createNewVersion .outputs.NEW_VERSION }}"
190
- git push origin main
153
+ git commit -m "Update Mobile-Expensify submodule version to ${{ steps.bumpVersion .outputs.NEW_VERSION }}"
154
+ git push origin main
191
155
192
156
- name : Announce failed workflow in Slack
193
157
if : ${{ failure() }}
0 commit comments