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