-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (73 loc) · 3.09 KB
/
ios-release.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
name: ios-release
#
# This workflow is run for all commits in release/* branches.
#
on:
push:
branches: [ release/* ]
env:
COMMIT_SHA: ${{ github.sha }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
TARGET_BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
# Join all secrets, so that they're "used", and will be masked in logs
MASKED_SECRETS: ${{ join(secrets, '\n') }}
jobs:
build:
runs-on: macOS-13
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Show build info
env:
TEST_SECRET: ${{ secrets.MASK_TEST }}
run: scripts/show-ci-info.sh
- name: SSH setup (for cloning ekirjasto-ios-keys through Fastlane match)
uses: MrSquaare/[email protected]
with:
private-key-name: ekirjasto-ci-ed25519
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
host: github.com
- name: Force Xcode 15
run: sudo xcode-select -switch /Applications/Xcode_15.0.1.app
- name: Bootstrap (and reveal secrets)
env:
EKIRJASTO_FASTLANE_APP_STORE_CONNECT_API_KEY_JSON_BASE64: ${{ secrets.FASTLANE_APP_STORE_CONNECT_API_KEY_JSON }}
EKIRJASTO_IOS_TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }}
EKIRJASTO_LIBLCP_DEPENDENCY_SECRET: ${{ secrets.LIBLCP_DEPENDENCY_SECRET }}
# Carthage gets rate limited in GitHub Actions if unauthenticated
# (they're all public repositories, so auth isn't otherwise necessary)
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: scripts/bootstrap.sh --overwrite-secrets
- name: App version and build number consistency check
run: scripts/version.sh --check
- name: Upload and download Transifex localizations
env:
EKIRJASTO_IOS_TRANSIFEX_SECRET: ${{ secrets.TRANSIFEX_SECRET }}
EKIRJASTO_IOS_TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }}
run: scripts/transifex.sh --append-tags=release
- name: Build debug build
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: scripts/build.sh debug
- name: Run tests
if: ${{ !cancelled() }}
run: scripts/run-tests.sh
- name: Run release checks
env:
EKIRJASTO_IOS_TRANSIFEX_SECRET: ${{ secrets.TRANSIFEX_SECRET }}
EKIRJASTO_IOS_TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }}
run: scripts/release-checks.sh
- name: Build release build and upload to Testflight (config=production)
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: scripts/build.sh release_upload config:production
- name: Build release build and upload to Testflight (config=beta)
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: scripts/build.sh release_upload config:beta
- name: Build release build and upload to Testflight (config=dev)
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: scripts/build.sh release_upload config:dev