-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (58 loc) · 1.74 KB
/
build_apk.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
name: Build APK
on:
workflow_call:
inputs:
version:
description: "Version"
required: true
default: "0.0.0"
type: string
release-upload-url:
description: "Release upload URL"
required: true
type: string
app-name:
description: "Application name"
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
env:
RELEASE_PATH: build/app/outputs/apk/release
APPNAME: ${{ inputs.app-name }}
VERSION: ${{ inputs.version }}
steps:
- name: Checkout the code
uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- name: Remove Windows Assets
run: |
cd ./assets/images/ && rm -r windows
- name: Remove Windows Packages
run: |
sed -i '/fluentui_system_icons/d' pubspec.yaml
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Create .env file
run: |
cat > .env <<EOF
DISCORDAPPID=${{ secrets.DISCORDAPPID }}
SENTRYDSN=${{ secrets.SENTRYDSN }}
UPDATE=true
EOF
- name: Building APKs
run: flutter build apk --split-per-abi --obfuscate --split-debug-info=./debug
- name: List Directory Contents
run: ls -R ${{ env.RELEASE_PATH }}
- name: Upload APKs to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.RELEASE_PATH }}/*.apk