Skip to content

Commit e38d83f

Browse files
committed
Add release workflow github action
This action is intended to build the binaries needed for an iOS release and open a PR with the changes. Developers will still need to 1. write release notes 2. Create the Github Release after merging the pr 3. Distribute the cocoapod
1 parent e1e02a2 commit e38d83f

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/cd.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
permissions:
11+
contents: write
12+
13+
jobs:
14+
build:
15+
name: Build the binaries for the release and create a PR
16+
runs-on: macos-13
17+
18+
steps:
19+
- name: setup xcode
20+
uses: maxim-lobanov/setup-xcode@v1
21+
with:
22+
xcode-version: '14.1'
23+
- name: Checkout OneSignal-iOS-SDK
24+
uses: actions/checkout@v3
25+
# - name: Bump Version Number
26+
# run: |
27+
28+
- name: Build Binaries
29+
run: |
30+
chmod +x ./../../iOS_SDK/OneSignalSDK/build_all_frameworks.sh
31+
./../../iOS_SDK/OneSignalSDK/build_all_frameworks.sh
32+
# chmod +x ./../../iOS_SDK/OneSignalSDK/update_swift_package.sh
33+
# ./../../iOS_SDK/OneSignalSDK/update_swift_package.sh
34+
shell: bash
35+
- name: Commit Changes
36+
env:
37+
version: ${{ inputs.version }}
38+
run: |
39+
git config --local user.email "[email protected]"
40+
git config --local user.name "SyncR 🤖"
41+
git add .
42+
git commit -m "Release $version"
43+
44+
- name: Pushing changes
45+
uses: ad-m/github-push-action@master
46+
with:
47+
# github_token: ${{ secrets.ACTION_TOKEN_PAT }}
48+
repository: 'OneSignal/OneSignal-iOS-SDK'
49+
force: true
50+
branch: ${{ inputs.version }}
51+
52+
- name: "Submitting PR"
53+
uses: octokit/[email protected]
54+
with:
55+
route: POST /repos/{owner}/{repo}/pulls
56+
owner: OneSignal
57+
repo: OneSignal-iOS-SDK
58+
head: ${{ inputs.version }}
59+
base: main
60+
title: |
61+
"Release ${{ inputs.version }}"
62+
body: |
63+
"Add Release Notes For Review Here"
64+
# env:
65+
# GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN_PAT }}

0 commit comments

Comments
 (0)