-
Notifications
You must be signed in to change notification settings - Fork 16
85 lines (74 loc) · 2.6 KB
/
ci.yaml
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
on:
workflow_dispatch:
name: CI
jobs:
build-app:
name: Build app
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- os: android
runner: ubuntu-latest
- os: ios
runner: macos-latest
environment: dev
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.0.5"
channel: "stable"
cache: true
cache-key: deps-${{ hashFiles('**/pubspec.lock') }} # optional, change this to force refresh cache
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
- name: Setup Android environment
if: matrix.os == 'android'
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
PLAY_STORE_UPLOAD_KEY_BASE64: ${{ secrets.PLAY_STORE_UPLOAD_KEY_BASE64 }}
PLAY_STORE_KEY_INFO_BASE64: ${{ secrets.PLAY_STORE_KEY_INFO_BASE64 }}
run: |
echo "$GOOGLE_SERVICES_JSON" > app/google-services.json
echo "$PLAY_STORE_UPLOAD_KEY_BASE64" | base64 --decode > app/keystore.jks
echo "$PLAY_STORE_KEY_INFO_BASE64" | base64 --decode > key.properties
working-directory: ${{ matrix.os }}
- name: Setup Java
if: matrix.os == 'android'
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: "11"
- name: Setup iOS environment
if: matrix.os == 'ios'
env:
GOOGLE_SERVICES_PLIST: ${{ secrets.GOOGLE_SERVICES_PLIST }}
run: |
echo -n "$GOOGLE_SERVICES_PLIST" > Runner/GoogleService-Info.plist
flutter pub get && pod install
working-directory: ${{ matrix.os }}
- name: Setup Fastlane
uses: ruby/setup-ruby@v1
with:
ruby-version: "ruby"
bundler-cache: true
working-directory: ${{ matrix.os }}
- name: Run prebuild
run: bash prebuild.sh
- name: Build
env:
APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
CAPTCHA_TOKEN: ${{ secrets.CAPTCHA_TOKEN }}
SAAS_AVAILABLE: "true"
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
run: bundle exec fastlane dev
working-directory: ${{ matrix.os }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: linshare-dev
path: |
build/app/outputs/flutter-apk/app-release.apk
ios/LinShare.ipa