|
| 1 | +name: iOS CD |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + version: |
| 7 | + type: string |
| 8 | + description: "The version number of the release" |
| 9 | + required: true |
| 10 | + release_branch: |
| 11 | + type: string |
| 12 | + description: "The release branch with bumped version numbers for the release" |
| 13 | + required: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + name: Build the binaries for the release and create a PR |
| 18 | + runs-on: macos-13 |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: setup xcode |
| 22 | + uses: maxim-lobanov/setup-xcode@v1 |
| 23 | + with: |
| 24 | + xcode-version: '14.1' |
| 25 | + - name: Checkout OneSignal-iOS-SDK |
| 26 | + uses: actions/checkout@v4 |
| 27 | + with: |
| 28 | + ref: ${{env.release_branch}} |
| 29 | + |
| 30 | + - name: Install the Apple certificate and provisioning profile |
| 31 | + uses: apple-actions/import-codesign-certs@v2 |
| 32 | + with: |
| 33 | + p12-file-base64: ${{ secrets.CERTIFICATES_P12 }} |
| 34 | + p12-password: ${{ secrets.CERTIFICATES_P12_PASSWORD }} |
| 35 | + # - name: Bump Version Number |
| 36 | + # run: | |
| 37 | + - name: Build Binaries |
| 38 | + run: | |
| 39 | + cd iOS_SDK/OneSignalSDK |
| 40 | + chmod +x ./build_all_frameworks.sh |
| 41 | + ./build_all_frameworks.sh |
| 42 | + shell: bash |
| 43 | + - name: Update Swift Package |
| 44 | + run: | |
| 45 | + cd iOS_SDK/OneSignalSDK |
| 46 | + chmod +x ./update_swift_package.sh |
| 47 | + ./update_swift_package.sh ${{env.version}} |
| 48 | + shell: bash |
| 49 | + - name: Commit Changes |
| 50 | + run: | |
| 51 | + git config --local user.email "[email protected]" |
| 52 | + git config --local user.name "SyncR 🤖" |
| 53 | + git add . |
| 54 | + git commit -m "Release ${{env.version}}" |
| 55 | +
|
| 56 | + - name: Pushing changes |
| 57 | + uses: ad-m/github-push-action@master |
| 58 | + with: |
| 59 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + repository: 'OneSignal/OneSignal-iOS-SDK' |
| 61 | + force: true |
| 62 | + branch: ${{env.release_branch}} |
| 63 | + |
| 64 | + - name: "Submitting PR" |
| 65 | + |
| 66 | + with: |
| 67 | + route: POST /repos/{owner}/{repo}/pulls |
| 68 | + owner: OneSignal |
| 69 | + repo: OneSignal-iOS-SDK |
| 70 | + head: ${{env.release_branch}} |
| 71 | + base: main |
| 72 | + title: | |
| 73 | + "Release ${{env.version}}" |
| 74 | + body: | |
| 75 | + "Add Release Notes For Review Here" |
| 76 | + env: |
| 77 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments