-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (82 loc) · 2.81 KB
/
ios-selfhosted-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
name: Self-hosted Build
on:
workflow_call:
inputs:
use_git_lfs:
description: Whether to download Git-LFS files.
type: boolean
required: false
default: false
custom_values:
description: "Custom string that can contains values specified in your workflow file. Those values will be placed into environment variable. Example: \"CUSTOM-1: 1; CUSTOM-2: 2\""
type: string
required: false
secrets:
MATCH_PASSWORD:
required: true
description: >
Password for decrypting of certificates and provisioning profiles.
APP_STORE_CONNECT_API_KEY_KEY:
required: true
description: >
Private App Store Connect API key for submitting build to App Store.
APP_STORE_CONNECT_API_KEY_KEY_ID:
required: true
description: >
Private App Store Connect API key for submitting build to App Store.
APP_STORE_CONNECT_API_KEY_ISSUER_ID:
required: true
description: >
Private App Store Connect API issuer key for submitting build to App Store.
jobs:
detect_changes:
runs-on: ubuntu-latest
name: Detect changes
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
if: ${{ github.event_name == 'schedule' }}
name: Check latest commit is less than a day
run: |
sha=$(git rev-list --after="24 hours" ${{ github.sha }})
if test -z "$sha"; then
echo "should_run=false" >> "$GITHUB_OUTPUT"
fi
build:
runs-on: self-hosted
timeout-minutes: 30
needs: detect_changes
if: ${{ needs.detect_changes.outputs.should_run != 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: ${{ inputs.use_git_lfs }}
- name: Fastlane Beta
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec fastlane beta
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
PR_TITLE: ${{ github.event.pull_request.title }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
CUSTOM_VALUES: ${{ inputs.custom_values }}
- name: Upload IPA
uses: actions/upload-artifact@v4
with:
name: Build.ipa
path: build_output/*.ipa
- name: Upload dSYM
uses: actions/upload-artifact@v4
with:
name: Build.app.dSYM.zip
path: build_output/*.app.dSYM.zip