-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (69 loc) · 2.99 KB
/
Copy pathcd.yaml
File metadata and controls
85 lines (69 loc) · 2.99 KB
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: Siksha-CD
on:
push:
tags:
- testflight/v[0-9]+.[0-9]+.[0-9]+-*.[0-9]+
- appstore/v[0-9]+.[0-9]+.[0-9]+-*.[0-9]+
jobs:
deploy:
name: Execute fastlane for testflight / appstore
env:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
SSH_KEY: ${{ secrets.SSH_KEY }}
APPSTORE_CONNECT_KEY_ID: ${{ secrets.APPSTORE_CONNECT_KEY_ID }}
APPSTORE_CONNECT_ISSUER_ID: ${{ secrets.APPSTORE_CONNECT_ISSUER_ID }}
APPSTORE_CONNECT_KEY_CONTENT: ${{ secrets.APPSTORE_CONNECT_KEY_CONTENT }}
PROFILE_NAME: ${{ secrets.PROFILE_NAME }}
TEAM_ID: ${{ secrets.TEAM_ID }}
SLACK_URL: ${{ secrets.SLACK_WEBHOOK }}
GIT_TAG_NAME: ${{ github.ref_name }}
BUNDLE_IDENTIFIER: ${{ secrets.BUNDLE_IDENTIFIER }}
BUNDLE_IDENTIFIER_DEV: ${{ secrets.BUNDLE_IDENTIFIER_DEV }}
XCODE_VERSION: "16.2"
runs-on: macos-15
steps:
- name: Parse tag name
uses: actions-ecosystem/action-regex-match@v2
id: regex
with:
text: ${{ github.ref_name }}
regex: '^(testflight|appstore)\/v(\d+)\.(\d+)\.(\d+)-(release|debug)\.(\d+)$'
- if: ${{ steps.regex.outputs.group1 == 'appstore' && steps.regex.outputs.group5 == 'debug' }}
run: |
echo "you can't upload debug build to appstore!"
exit 1
- uses: actions/checkout@v3
- run: |
sudo xcode-select -s /Applications/Xcode_${XCODE_VERSION}.app/Contents/Developer
ls
- name: Set version number and build number
run: |
echo "VERSION_NUMBER=${{ steps.regex.outputs.group2 }}.${{ steps.regex.outputs.group3 }}.${{ steps.regex.outputs.group4 }}" >> $GITHUB_ENV
echo "BUILD_NUMBER=${{ steps.regex.outputs.group6 }}" >> $GITHUB_ENV
- name: Install Ruby Dependencies
run: |
bundle install
bundle update fastlane
- name: Setup match repo ssh
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Inject secret file dependencies
env:
BUNDLE: ${{ secrets.BUNDLE }}
BUNDLE_DEV: ${{secrets.BUNDLE_DEV}}
CONFIG: ${{ secrets.CONFIG }}
GOOGLE_SERVICE_INFO: ${{ secrets.GOOGLE_SERVICE_INFO }}
GOOGLE_SERVICE_INFO_DEV: ${{ secrets.GOOGLE_SERVICE_INFO_DEV }}
run: |
mkdir "Siksha/Supporting Files"
echo "$BUNDLE" > "Siksha/Supporting Files/bundle.xcconfig"
echo "$BUNDLE_DEV" > "Siksha/Supporting Files/bundle-dev.xcconfig"
echo "$CONFIG" > "Siksha/Supporting Files/config.plist"
echo "$GOOGLE_SERVICE_INFO" > "Siksha/Supporting Files/GoogleService-Info.plist"
echo "$GOOGLE_SERVICE_INFO_DEV" > "Siksha/Supporting Files/GoogleService-Info-dev.plist"
- name: Upload prod app to TestFlight
if: ${{ steps.regex.outputs.group1 == 'testflight' && steps.regex.outputs.group5 == 'release' }}
run: |
bundle exec fastlane beta