Skip to content

Commit 6a4ce90

Browse files
authored
Merge pull request #1618 from OneSignal/fg/wrapper-prs
ci: create release prs for wrappers for new ios sdk release
2 parents 697cdb7 + ed230a3 commit 6a4ce90

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

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

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ on:
1414
type: string
1515
required: true
1616
base_branch:
17-
description: 'Target branch for the PR (e.g. main for regular releases, 5.3-main for 5.3.x releases)'
17+
description: "Target branch for the PR (e.g. main for regular releases, 5.3-main for 5.3.x releases)"
1818
type: string
1919
required: false
20-
default: 'main'
20+
default: "main"
2121

2222
permissions:
2323
contents: write
@@ -60,10 +60,8 @@ jobs:
6060
ref: ${{ needs.prep.outputs.release_branch }}
6161
fetch-depth: 0
6262

63-
- name: Configure Git
64-
run: |
65-
git config --local user.email "noreply@onesignal.com"
66-
git config --local user.name "github-actions[bot]"
63+
- name: Setup Git User
64+
uses: OneSignal/sdk-actions/.github/actions/setup-git-user@main
6765

6866
- name: Extract Current Version
6967
id: extract_version
@@ -75,7 +73,7 @@ jobs:
7573
- name: Setup Xcode
7674
uses: maxim-lobanov/setup-xcode@v1
7775
with:
78-
xcode-version: '15.2'
76+
xcode-version: "15.2"
7977

8078
- name: Install the Apple distribution certificate and provisioning profile (OneSignal)
8179
uses: apple-actions/import-codesign-certs@v2
@@ -194,6 +192,9 @@ jobs:
194192
path: xcframework-repo
195193
token: ${{ secrets.PAT_TOKEN_ONESIGNAL_XCFRAMEWORK }}
196194

195+
- name: Setup Git User
196+
uses: OneSignal/sdk-actions/.github/actions/setup-git-user@main
197+
197198
- name: Update Package.swift in XCFramework Repository
198199
run: |
199200
# Copy Package.swift from iOS SDK to XCFramework repo
@@ -211,10 +212,6 @@ jobs:
211212
# Create release branch
212213
git checkout -b $RELEASE_BRANCH
213214
214-
# Configure git
215-
git config --local user.email "noreply@onesignal.com"
216-
git config --local user.name "github-actions[bot]"
217-
218215
# Commit changes
219216
git commit -am "Release $VERSION"
220217

.github/workflows/publish-release.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,23 @@ on:
88
workflow_dispatch:
99
inputs:
1010
ref:
11-
description: 'Branch or commit SHA to run on (e.g., main, 5.3-main)'
11+
description: "Branch or commit SHA to run on (e.g., main, 5.3-main)"
1212
type: string
1313
required: false
14-
default: 'main'
14+
default: "main"
1515

1616
permissions:
1717
contents: write
18+
pull-requests: write
1819

1920
concurrency:
2021
group: ${{ github.workflow }}-${{ github.ref }}
2122
cancel-in-progress: true
2223

2324
jobs:
2425
publish:
26+
outputs:
27+
sdk_version: ${{ steps.extract_version.outputs.version }}
2528
runs-on: macos-13
2629

2730
env:
@@ -63,7 +66,7 @@ jobs:
6366
- name: Setup Ruby
6467
uses: ruby/setup-ruby@v1
6568
with:
66-
ruby-version: '3.0'
69+
ruby-version: "3.0"
6770

6871
- name: Install CocoaPods
6972
run: |
@@ -181,3 +184,11 @@ jobs:
181184
echo "📦 CocoaPods OneSignalXCFramework: https://cocoapods.org/pods/OneSignalXCFramework"
182185
echo "🔗 iOS SDK Release: https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/$VERSION"
183186
echo "🔗 XCFramework Release: https://github.com/OneSignal/OneSignal-XCFramework/releases/tag/$VERSION"
187+
188+
wrapper_prs:
189+
needs: publish
190+
uses: OneSignal/sdk-actions/.github/workflows/create-wrapper-prs.yml@main
191+
secrets:
192+
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
193+
with:
194+
ios_version: ${{ needs.publish.outputs.sdk_version }}

0 commit comments

Comments
 (0)