-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (52 loc) · 1.89 KB
/
Copy pathandroid-release.yaml
File metadata and controls
63 lines (52 loc) · 1.89 KB
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
name: Build Apk and Release
on:
push:
tags:
- 'v*'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
apk:
name: Flutter APK
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Java (required for Android builds)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '25'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Flutter dependencies
working-directory: mobile
run: flutter pub get
- name: Run Flutter analyze
working-directory: mobile
run: flutter analyze --no-fatal-infos
- name: Build release APK
working-directory: mobile
run: flutter build apk --release --split-per-abi
- name: Rename APKs with version tag
run: |
mv mobile/build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-armeabi-v7a.apk
mv mobile/build/app/outputs/flutter-apk/app-arm64-v8a-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-arm64-v8a.apk
mv mobile/build/app/outputs/flutter-apk/app-x86_64-release.apk mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-x86_64.apk
- name: Create or update GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: Elephant ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: mobile/build/app/outputs/flutter-apk/elephant-${{ github.ref_name }}-*.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}