-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.53 KB
/
android.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
# SPDX-FileCopyrightText: 2019-2021 Vishesh Handa <me@vhanda.in>
#
# SPDX-License-Identifier: Apache-2.0
name: Android
on:
push:
branches:
- master
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Give more Disk Space
run: sudo rm -rf /usr/share/dotnet
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Unlock secrets
uses: sliteteam/github-action-git-crypt-unlock@1.2.0
env:
GIT_CRYPT_KEY: ${{ secrets.GITCRYPT_KEY }}
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Get Flutter version from pubspec
run: |
set -e
FLUTTER_VERSION=$(cat pubspec.yaml | grep 'flutter:' | head -n 1 | awk '{ print $2 }' | tr -d '"' | cut -d "=" -f 2)
echo "FLUTTER_VERSION=${FLUTTER_VERSION}" >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Setup Env
run: dart ./scripts/setup_env.dart
- name: Flutter Doctor
run: flutter doctor
- name: Get Flutter Deps
run: flutter pub get --suppress-analytics
- name: Build
run: ./scripts/build_android.sh
- name: "Upload Artifact"
uses: actions/upload-artifact@v2
with:
name: APK
path: "*.apk"
if-no-files-found: error
- name: Publish Alpha
run: cd android && fastlane alphaBuild