diff --git a/.github/workflows/create-release-prs.yml b/.github/workflows/create-release-prs.yml index 2af562d9c..458430a0b 100644 --- a/.github/workflows/create-release-prs.yml +++ b/.github/workflows/create-release-prs.yml @@ -14,10 +14,10 @@ on: type: string required: true base_branch: - description: 'Target branch for the PR (e.g. main for regular releases, 5.3-main for 5.3.x releases)' + description: "Target branch for the PR (e.g. main for regular releases, 5.3-main for 5.3.x releases)" type: string required: false - default: 'main' + default: "main" permissions: contents: write @@ -60,10 +60,8 @@ jobs: ref: ${{ needs.prep.outputs.release_branch }} fetch-depth: 0 - - name: Configure Git - run: | - git config --local user.email "noreply@onesignal.com" - git config --local user.name "github-actions[bot]" + - name: Setup Git User + uses: OneSignal/sdk-actions/.github/actions/setup-git-user@main - name: Extract Current Version id: extract_version @@ -75,7 +73,7 @@ jobs: - name: Setup Xcode uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '15.2' + xcode-version: "15.2" - name: Install the Apple distribution certificate and provisioning profile (OneSignal) uses: apple-actions/import-codesign-certs@v2 @@ -194,6 +192,9 @@ jobs: path: xcframework-repo token: ${{ secrets.PAT_TOKEN_ONESIGNAL_XCFRAMEWORK }} + - name: Setup Git User + uses: OneSignal/sdk-actions/.github/actions/setup-git-user@main + - name: Update Package.swift in XCFramework Repository run: | # Copy Package.swift from iOS SDK to XCFramework repo @@ -211,10 +212,6 @@ jobs: # Create release branch git checkout -b $RELEASE_BRANCH - # Configure git - git config --local user.email "noreply@onesignal.com" - git config --local user.name "github-actions[bot]" - # Commit changes git commit -am "Release $VERSION" diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index b67bb7a02..c3d02872e 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -8,13 +8,14 @@ on: workflow_dispatch: inputs: ref: - description: 'Branch or commit SHA to run on (e.g., main, 5.3-main)' + description: "Branch or commit SHA to run on (e.g., main, 5.3-main)" type: string required: false - default: 'main' + default: "main" permissions: contents: write + pull-requests: write concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -22,6 +23,8 @@ concurrency: jobs: publish: + outputs: + sdk_version: ${{ steps.extract_version.outputs.version }} runs-on: macos-13 env: @@ -63,7 +66,7 @@ jobs: - name: Setup Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.0' + ruby-version: "3.0" - name: Install CocoaPods run: | @@ -181,3 +184,11 @@ jobs: echo "📦 CocoaPods OneSignalXCFramework: https://cocoapods.org/pods/OneSignalXCFramework" echo "🔗 iOS SDK Release: https://github.com/OneSignal/OneSignal-iOS-SDK/releases/tag/$VERSION" echo "🔗 XCFramework Release: https://github.com/OneSignal/OneSignal-XCFramework/releases/tag/$VERSION" + + wrapper_prs: + needs: publish + uses: OneSignal/sdk-actions/.github/workflows/create-wrapper-prs.yml@main + secrets: + GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }} + with: + ios_version: ${{ needs.publish.outputs.sdk_version }}