-
Notifications
You must be signed in to change notification settings - Fork 8
98 lines (97 loc) · 3.51 KB
/
release-ios.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
name: Release iOS
on:
workflow_dispatch:
inputs:
releaseStage:
description: 'alpha, beta or production release (alpha does not upload to TestFlight)'
required: true
default: 'beta'
githubRef:
description: 'Github ref to build and release'
required: true
default: 'develop'
release:
types: [created]
jobs:
release-ios:
name: Release iOS
runs-on: macos-latest
env:
CRYPTEX_GIT_URL: https://${{ secrets.CI_GITHUB_PERSONAL_ACCESS_TOKEN }}@github.com/${{ secrets.CRYPTEX_GIT_REPOSITORY }}.git
CRYPTEX_PASSWORD: ${{ secrets.CRYPTEX_PASSWORD }}
steps:
- name: Set environment variables
env:
DEFAULT_STAGE: beta
DEFAULT_REF: ${{ github.event.release.tag_name }}
run: |
echo "CHECKOUT_REF=${{ github.event.inputs.githubRef || env.DEFAULT_REF }}" >> $GITHUB_ENV
echo "RELEASE_STAGE=${{ github.event.inputs.releaseStage || env.DEFAULT_STAGE}}" >> $GITHUB_ENV
- uses: sarisia/actions-status-discord@v1
if: ${{ always() }}
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: TestFlight release started
color: 0xFFFFFF
- name: Checkout tag
uses: actions/checkout@v3
with:
ref: ${{ env.CHECKOUT_REF }}
- uses: volta-cli/action@v4
- uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
cache: 'yarn'
- name: Setup Ruby & bundle
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Decrypt fastlane vars
run: bundle exec fastlane run decrypt_fastlane_vars
- uses: actions/cache@v3
with:
path: '**/Pods'
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-
- name: Yarn Install
run: yarn install --prefer-offline --frozen --frozen-lockfile
- name: Patch Packages
run: yarn patch-package
- name: RN Nodeify
run: yarn nodeify
- name: Bundle Install (ios)
run: yarn install-bundle
- name: Pod Install (ios)
run: yarn install-pods-fast
- name: Sync google_services
run: yarn contexts:sync:google_services
- name: Sync sentry_properties
run: yarn fastlane sync_sentry_properties
- name: Run fastlane (ios)
run: cd ios && bundle exec fastlane ${{ env.FASTLANE_STAGE }} build_number:${{ env.BUILD_NUMBER }}
env:
BUILD_NUMBER: ${{ github.run_number }}
FASTLANE_STAGE: ${{ env.RELEASE_STAGE }}
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.FASTLANE_APPLICATION_SPECIFIC_PASSWORD }}
MATCH_GIT_URL: ${{ env.CRYPTEX_GIT_URL }}
MATCH_PASSWORD: ${{ env.CRYPTEX_PASSWORD }}
- uses: actions/upload-artifact@v3
with:
name: Rainbow IPA
path: ios/Rainbow.ipa
- uses: actions/upload-artifact@v3
with:
name: Rainbow DYSM
path: ios/Rainbow.app.dSYM.zip
- uses: sarisia/actions-status-discord@v1
if: ${{ failure() }}
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: TestFlight release failed
color: 0xFF5054
- uses: sarisia/actions-status-discord@v1
if: ${{ success() }}
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
title: TestFlight release completed
color: 0x37EB77