-
Notifications
You must be signed in to change notification settings - Fork 3
142 lines (134 loc) · 4.87 KB
/
ios-sdk-ci.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: "iOS SDK CI"
on:
pull_request:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+(-[a-zA-Z0-9]+)?"
jobs:
# setup:
# name: "Setup"
# runs-on: macos-13
# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# - name: Install ruby and gem dependencies
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: 3.0.7
# bundler-cache: true # runs 'bundle install' and caches installed gems automatically
# sdk-tests:
# name: "SDK Tests"
# runs-on: macos-13
# needs: [setup]
# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# - name: Bundle install
# run: bundle install
# - name: Run Tests
# run: bundle exec fastlane tests
# - name: Store Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: test-results
# path: ./fastlane/test_output
# build-demo-swift:
# name: "Build Demo Swift"
# runs-on: macos-14
# needs: [setup, sdk-tests]
# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# - name: Bundle install
# run: bundle install
# - name: Build Demo Swift
# id: build-demo-swift
# run: bundle exec fastlane demo_swift
# - name: Store Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: demo-swift
# path: ./demo-ios-swift/Pods
# - name: Store build log
# uses: actions/upload-artifact@v4
# with:
# name: build-log-swift
# path: /Users/runner/Library/Logs/gym
# build-demo-objc:
# name: "Build Demo Objective-C"
# runs-on: macos-14
# env:
# FL_OUTPUT_DIR: output
# needs: [setup, sdk-tests]
# steps:
# - name: Checkout Code
# uses: actions/checkout@v4
# - name: Bundle install
# run: bundle install
# - name: Build Demo Objective-C
# run: bundle exec fastlane demo_objc
# - name: Store Artifacts
# uses: actions/upload-artifact@v4
# with:
# name: demo-objc
# path: ./demo-ios-objc/Pods
# - name: Store build log
# uses: actions/upload-artifact@v4
# with:
# name: build-log-objc
# path: /Users/runner/Library/Logs/gym
slack-notification:
runs-on: ubuntu-22.04
# needs: [build-demo-swift, build-demo-objc]
steps:
- name: Successful Release Post to Slack
uses: slackapi/[email protected]
if: ${{ success() && (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) }}
with:
method: chat.postMessage
token: "${{ secrets.SLACK_MESSENGER_APP_TOKEN }}"
payload: |
channel: "${{ secrets.ALERTS_SLACK_CHANNEL_ID }}"
text: "iOS SDK release: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
blocks:
- type: "header"
text:
type: "plain_text"
text: ":certified: iOS SDK release"
emoji: true
- type: "section"
fields:
- type: "mrkdwn"
text: "*Status:*\n${{ job.status }}"
- type: "mrkdwn"
text: "*Branch:*\n${{ github.ref_name }}"
- type: "mrkdwn"
text: "*Author:*\n${{ github.actor || github.triggering_actor }}"
- type: "mrkdwn"
text: ":white_check_mark: *iOS SDK release:*\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- name: Build failure Post to Slack
uses: slackapi/[email protected]
# if: ${{ failure() && github.event_name == 'pull_request' }}
if: ${{ always()}}
with:
method: chat.postMessage
token: "${{ secrets.SLACK_MESSENGER_APP_TOKEN }}"
payload: |
channel: "${{ secrets.ALERTS_SLACK_CHANNEL_ID }}"
text: "iOS SDK release: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
blocks:
- type: "header"
text:
type: "plain_text"
text: ":certified: iOS SDK release"
emoji: true
- type: "section"
fields:
- type: "mrkdwn"
text: "*Status:*\n${{ job.status }}"
- type: "mrkdwn"
text: "*Branch:*\n${{ github.ref_name }}"
- type: "mrkdwn"
text: "*Author:*\n${{ github.actor || github.triggering_actor }}"
- type: "mrkdwn"
text: ":x: *iOS SDK release:*\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"