-
Notifications
You must be signed in to change notification settings - Fork 12
85 lines (70 loc) · 2.42 KB
/
test_upload_build_to_firebase.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
name: Test Upload Build to Firebase
# SECRETS needed:
### SSH_PRIVATE_KEY for Match Repo
### MATCH_PASS
### FIREBASE_TOKEN
### STAGING_FIREBASE_APP_ID
### TEAM_ID
on:
pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: macOS-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install SSH key
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Install Firebase-Tools
run: |
yarn global add firebase-tools
echo "$(yarn global bin)" >> $GITHUB_PATH
- name: Bundle install
run: bundle install
- name: Cache Pods
uses: actions/cache@v3
id: cocoapodCache
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Start Install Script for Template App
run: sh make.sh --bundle-id co.nimblehq.ios.templates --bundle-id-staging co.nimblehq.ios.templates.staging --project-name TemplateApp --interface UIKit
- name: Start Setup Script for Template App Firebase Upload
run: cat Scripts/Swift/SetUpTestFirebase.swift Scripts/Swift/Extensions/FileManager+Utils.swift | swift -
env:
MATCH_REPO: ${{ secrets.MATCH_REPO }}
STAGING_FIREBASE_APP_ID: ${{ secrets.STAGING_FIREBASE_APP_ID }}
TEAM_ID: ${{ secrets.TEAM_ID }}
- name: Set Up Test Project for Firebase
run: bundle exec fastlane setUpTestProject
- name: Sync Ad Hoc Code Signing
run: bundle exec fastlane syncAdHocStagingCodeSigning
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASS }}
- name: Build App and Distribute to Firebase
run: bundle exec fastlane buildStagingAndUploadToFirebase
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ format('v{0}({1})-{2}', env.VERSION_NUMBER, env.BUILD_NUMBER, env.TAG_TYPE) }}
path: |
${{ env.IPA_OUTPUT_PATH }}
${{ env.DSYM_OUTPUT_PATH }}
env:
TAG_TYPE: Staging_Firebase
- name: Remove keychain
if: ${{ always() }}
run: bundle exec fastlane removeKeychain
continue-on-error: true