-
Notifications
You must be signed in to change notification settings - Fork 6
77 lines (67 loc) · 2.49 KB
/
ios-app-build.yaml
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
name: Build iOS app
on:
workflow_dispatch:
inputs:
build_type:
description: '`debug` or `release`'
required: true
default: 'debug'
jobs:
build-ios:
runs-on: macos-latest
name: Build iOS application
environment: 'es-fastlane-match'
steps:
- name: Install the Apple certificate and provisioning profile
uses: eclipsesource/prepare-for-signing-action@v1
with:
app_identifier: 'com.eclipsesource.tabris.remote'
profile_type: ${{ github.event.inputs.build_type == 'release' && 'appstore' || 'development' }}
match_git_url: ${{ vars.TABRIS_IOS_MATCH_GIT_URL }}
match_git_branch: ${{ vars.TABRIS_IOS_MATCH_GIT_BRANCH }}
match_git_ssh_key: ${{ secrets.TABRIS_IOS_MATCH_GIT_SSH_KEY }}
match_password: ${{ secrets.TABRIS_IOS_MATCH_PASSWORD }}
fastlane_team_id: ${{ vars.TABRIS_IOS_FASTLANE_TEAM_ID }}
fastlane_user: ${{ vars.TABRIS_IOS_FASTLANE_USER }}
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install tabris-cli
run: npm install -g tabris-cli
- name: Install application dependencies
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm run --if-present prepare
npm install
- name: Build application
env:
TABRIS_BUILD_KEY: ${{ secrets.TABRIS_IOS_BUILD_KEY }}
run: |
tabris build ios --${{ github.event.inputs.build_type }} --device --verbose
- name: Prepare artifacts for archival
run: |
mkdir -p artifacts
printenv | grep GITHUB_ > artifacts/env-gha
cp -R \
"$(find . -iname "*.app.dSYM")" \
"$(find . -iname "*.ipa")" \
artifacts
tar cf artifacts.tar artifacts
- name: Archive metadata
uses: actions/upload-artifact@v3
with:
name: artifacts.tar
path: artifacts.tar
retention-days: 30
- name: AppStore Upload
if: ${{ github.event.inputs.build_type == 'release' }}
env:
FASTLANE_USER: ${{ vars.TABRIS_IOS_FASTLANE_USER }}
FASTLANE_APP_SPECIFIC_PASSWORD: ${{ secrets.TABRIS_IOS_FASTLANE_APP_SPECIFIC_PASSWORD }}
run: |
xcrun altool --upload-app --type ios \
--file "$(find ./artifacts/ -iname "*.ipa")" \
--username $FASTLANE_USER \
--password $FASTLANE_APP_SPECIFIC_PASSWORD