Skip to content

Commit 3c70db9

Browse files
committed
ci: improve ci release process
1 parent 4743abe commit 3c70db9

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ on:
3535

3636
jobs:
3737
update-version:
38-
runs-on: ubuntu-latest
38+
runs-on: macos-latest
3939

4040
env:
4141
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -146,6 +146,13 @@ jobs:
146146
echo "prev_ios=$IOS_VERSION" >> $GITHUB_OUTPUT
147147
148148
# Cordova specific steps
149+
- name: Setup Capacitor
150+
run: |
151+
bun link
152+
cd example/IonicCapOneSignal
153+
bun install --frozen-lockfile
154+
bun run build
155+
149156
- name: Update Android SDK version
150157
if: inputs.android_version != ''
151158
run: |
@@ -159,11 +166,21 @@ jobs:
159166
# Update plugin.xml with new version
160167
sed -i "s|<framework src=\"com\.onesignal:OneSignal:[^\"]*\" />|<framework src=\"com.onesignal:OneSignal:${VERSION}\" />|" plugin.xml
161168
echo "✓ Updated plugin.xml with Android SDK ${VERSION}"
169+
170+
cd example/IonicCapOneSignal
171+
bunx cap sync android
172+
git add .
162173
else
163174
echo "✗ Android SDK version ${VERSION} not found"
164175
exit 1
165176
fi
166177
178+
- name: setup-cocoapods
179+
if: inputs.ios_version != ''
180+
uses: maxim-lobanov/setup-cocoapods@v1
181+
with:
182+
version: latest
183+
167184
- name: Update iOS SDK version
168185
if: inputs.ios_version != ''
169186
run: |
@@ -178,22 +195,18 @@ jobs:
178195
sed -i "s|<pod name=\"OneSignalXCFramework\" spec=\"[^\"]*\" />|<pod name=\"OneSignalXCFramework\" spec=\"${VERSION}\" />|" plugin.xml
179196
echo "✓ Updated plugin.xml with iOS SDK ${VERSION}"
180197
181-
# Need to clear the Podfile.lock to force a re-install of the framework
182-
rm -f example/IonicCapOneSignal/ios/App/Podfile.lock
198+
# Need to regenerate the Podfile.lock
199+
cd example/IonicCapOneSignal/ios/App
200+
rm -f Podfile.lock
201+
cd ../..
202+
bunx cap sync ios
203+
git add .
204+
183205
else
184206
echo "✗ iOS SDK version ${VERSION} not found"
185207
exit 1
186208
fi
187209
188-
- name: Capacitor update
189-
run: |
190-
bun link
191-
cd example/IonicCapOneSignal
192-
bun install --frozen-lockfile
193-
bun run build
194-
bunx cap sync || exit 1
195-
git add .
196-
197210
- name: Update sdk version
198211
run: |
199212
NEW_VERSION="${{ inputs.cordova_version }}"

0 commit comments

Comments
 (0)