-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (53 loc) · 2.07 KB
/
build-release-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
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build Android Release
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
build-android-release:
runs-on: ubuntu-latest
env:
RELEASE_VERSION: ${{ github.ref_name }} # Set the release version from the tag
steps:
- uses: actions/[email protected]
- name: Setup Node
uses: actions/[email protected]
with:
node-version: lts/*
- name: Install Rust Stable
uses: dtolnay/rust-toolchain@stable
- name: Install Ubuntu Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install Frontend Dependencies
run: npm install
- name: Build Web Assets 🔨
run: npm run build
- name: Set Up JDK
uses: actions/[email protected]
with:
distribution: "temurin"
java-version: "21"
- name: Set Up Android SDK
uses: android-actions/[email protected]
- name: Sync Capacitor Assets 🔨
run: npx cap sync && npx cap copy android
- name: Build APK with Dynamic Version Name
run: |
cd android
./gradlew assembleDebug
mv app/build/outputs/apk/debug/app-debug.apk app/build/outputs/apk/debug/Uplink_${{ env.RELEASE_VERSION }}.apk
- name: Upload APK
uses: actions/[email protected]
with:
name: build-android
path: android/app/build/outputs/apk/debug/Uplink_${{ env.RELEASE_VERSION }}.apk
retention-days: 5
- name: GitHub Release Android
uses: softprops/action-gh-release@v2
with:
files: |
android/app/build/outputs/apk/debug/Uplink_${{ env.RELEASE_VERSION }}.apk