-
Notifications
You must be signed in to change notification settings - Fork 10
59 lines (49 loc) · 1.74 KB
/
deploy.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
name: deploy
on:
push:
branches: [ master ]
tags: [ v* ]
jobs:
deploy:
runs-on: macos-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set environment variables from project settings
run: |
exec .github/scripts/set-env-from-xcodeproj.sh
- name: Import signing certificate
env:
SIGNING_CERTIFICATE_P12_DATA: ${{ secrets.SIGNING_CERTIFICATE_P12_DATA }}
SIGNING_CERTIFICATE_PASSWORD: ${{ secrets.SIGNING_CERTIFICATE_PASSWORD }}
run: |
exec .github/scripts/import-certificate.sh
- name: Import provisioning profile
env:
PROVISIONING_PROFILE_DATA: ${{ secrets.PROVISIONING_PROFILE_DATA }}
run: |
exec .github/scripts/import-profile.sh
- name: Build app
run: |
fastlane run build_app
- name: Upload build artifacts
uses: actions/upload-artifact@v2
with:
name: build.log
path: ~/Library/Logs/gym/*.log
- name: Upload release assets
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.PRODUCT_NAME }}.ipa
${{ env.PRODUCT_NAME }}.app.dSYM.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload app to App Store Connect
if: startsWith(github.ref, 'refs/tags/v')
env:
APP_STORE_CONNECT_USERNAME: ${{ secrets.APP_STORE_CONNECT_USERNAME }}
APP_STORE_CONNECT_PASSWORD: ${{ secrets.APP_STORE_CONNECT_PASSWORD }}
run: |
xcrun altool --upload-app -t ios -f "$PRODUCT_NAME.ipa" -u "$APP_STORE_CONNECT_USERNAME" -p "$APP_STORE_CONNECT_PASSWORD"