-
Notifications
You must be signed in to change notification settings - Fork 6
112 lines (109 loc) · 4.33 KB
/
xcode-versions-build.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
name: Multi-Xcode Build
on:
workflow_dispatch:
schedule:
- cron: '0 1 * * 1-5'
push:
branches:
- 'release/**'
jobs:
build:
name: "Build App"
runs-on: macos-13
strategy:
max-parallel: 3
matrix:
variant:
- cocoapods
- spm
xcode:
- 14.3.1
steps:
- name: Git - Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ github.ref }}
- name: Select Xcode Version
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
with:
xcode-version: ${{ matrix.xcode }}
- name: Install SSH key
uses: shimataro/ssh-key-action@d4fffb50872869abe2d9a9098a6d9c5aa7d16be4 #v2.7.0
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa_github_actions
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- uses: webfactory/ssh-agent@dc588b651fe13675774614f8e6a936a468676387 # v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_KEY }}
- uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
with:
ruby-version: "3.2"
bundler-cache: true
- name: Setup node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b #v4.0.3
with:
node-version: 18.3.0
- run: npm install --save slack-message-builder
- name: Build and archive app via Cocoapods
if: ${{ matrix.variant == 'cocoapods' }}
run: |
bundle exec fastlane build_cocoapods tests:false skip_package_ipa:false
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
SOURCE_BRANCH: ${{ github.head_ref }}
- name: Build and archive app via SPM
if: ${{ matrix.variant == 'spm' }}
run: |
bundle exec fastlane test_sdk sim_version:16.4
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_GIT_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
FASTLANE_PASSWORD: ${{ secrets.FASTLANE_PASSWORD }}
FASTLANE_SESSION: ${{ secrets.FASTLANE_SESSION }}
MATCH_KEYCHAIN_NAME: ${{ secrets.MATCH_KEYCHAIN_NAME }}
MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
SOURCE_BRANCH: ${{ github.head_ref }}
- name: Create Slack Failure Summary Report
if: ${{ failure() }}
run: |
node Report\ Scripts/multixcode-failure-report.js createMultiXcodeFailureReport ${{ github.head_ref || github.ref_name }} ${{ matrix.xcode}} ${{ matrix.variant }}
- name: Slack Notification
if: ${{ failure() }}
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e #v1.26.0
with:
channel-id: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
payload-file-path: '/var/tmp/multixcode-failure-report.json'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_REPORTER_BOT_TOKEN }}
success:
name: Report Success
needs: build
runs-on: macos-latest
steps:
- name: Git - Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ github.ref }}
- name: Setup node
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b #v4.0.3
with:
node-version: 18.3.0
- run: npm install --save slack-message-builder
- name: Create Slack Success Summary Report
if: ${{ success() }}
run: |
node Report\ Scripts/multixcode-success-report.js createMultiXcodeSummaryReport ${{ github.head_ref || github.ref_name }} "14.3.1, 14.2, 14.1" "cocoapods, spm"
- name: Slack Notification
if: ${{ success() }}
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e #v1.26.0
with:
channel-id: ${{ secrets.SLACK_MOBILE_SDK_CHANNEL }}
payload-file-path: '/var/tmp/multixcode-success-summary.json'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_REPORTER_BOT_TOKEN }}