forked from hpi-studyu/studyu
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (87 loc) · 3.14 KB
/
deploy-apps.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
name: Deploy apps
on:
push:
branches:
- main
- dev
paths:
- 'app/**'
- 'core/**'
- 'flutter_common/**'
workflow_dispatch:
jobs:
play-store-release:
name: Create Play Store Release
runs-on: ubuntu-latest
steps:
- name: Await potential publishing on Pub.dev
uses: johannesvedder/await-workflow@v1
with:
workflowId: 'publish_pubdev.yml'
- name: Get the tag name
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v3
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.1
bundler-cache: true
working-directory: './app/android'
- name: Decrypt files
id: decrypt_files
run: |
echo "${{ secrets.STUDYU_ANDROID_KEYSTORE }}" > keystore.jks.asc
gpg -d --passphrase "${{ secrets.STUDYU_ANDROID_KEYSTORE_PASSWORD }}" --batch keystore.jks.asc > app/android/studyu-keystore.jks
echo "${{ secrets.STUDYU_KEY_PROPERTIES}}" > app/android/key.properties
- name: Set up flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build StudyU app bundle
run: flutter build appbundle --no-tree-shake-icons --build-number ${{ github.run_number }}
working-directory: ./app
- name: Fastlane upload
uses: maierj/[email protected]
with:
lane: 'internal'
subdirectory: './app/android'
env:
PLAY_CREDS_JSON: ${{ secrets.PLAY_CREDS_JSON }}
app-store-release:
name: Create App Store Release
runs-on: macos-latest
steps:
- name: Await potential publishing on Pub.dev
uses: johannesvedder/await-workflow@v1
with:
workflowId: 'publish_pubdev.yml'
- name: Checkout code
uses: actions/checkout@v3
- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.1
bundler-cache: true
working-directory: './app/ios'
- name: Set up flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Build StudyU ios without codesign
run: flutter build ios --no-codesign --no-tree-shake-icons --build-number ${{ github.run_number }}
working-directory: ./app
- name: Fastlane upload
uses: maierj/[email protected]
with:
lane: 'upload_testflight'
subdirectory: './app/ios'
env:
FASTLANE_APP_IOS_KEY_ID: ${{ secrets.FASTLANE_APP_IOS_KEY_ID }}
FASTLANE_APP_IOS_ISSUER_ID: ${{ secrets.FASTLANE_APP_IOS_ISSUER_ID }}
FASTLANE_APP_IOS_KEY_CONTENT: ${{ secrets.FASTLANE_APP_IOS_KEY_CONTENT }}
FASTLANE_APP_IOS_MATCH_GIT_URL: ${{ secrets.FASTLANE_APP_IOS_MATCH_GIT_URL }}
FASTLANE_APP_IOS_MATCH_GIT_PRIVATE_KEY: ${{ secrets.FASTLANE_APP_IOS_MATCH_GIT_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
TEMP_KEYCHAIN_USER: ${{ secrets.TEMP_KEYCHAIN_USER }}
TEMP_KEYCHAIN_PASSWORD: ${{ secrets.TEMP_KEYCHAIN_PASSWORD }}