Skip to content

Commit

Permalink
Add workflow for building debug apk
Browse files Browse the repository at this point in the history
  • Loading branch information
InvictusRMC committed Feb 21, 2024
1 parent 4a0733e commit ef791c5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 3 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/apk_debug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Debug APK

on:
pull_request:
push:
branches: master

jobs:
apk:
name: Build Debug APK
runs-on: ubuntu-latest
environment:
name: apk_build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: refs/pull/${{github.event.pull_request.number}}/merge

- uses: ./.github/actions/checkout_submodules

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '17'

- name: Build debug APK
run: ./gradlew assembleDebug

- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: app
path: app/build/outputs/apk/debug/app-debug.apk
2 changes: 1 addition & 1 deletion .github/workflows/apk_main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build APK for master
name: Build Release APK for main branch

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/apk_pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build APK for PR
name: Build Release APK for pull requests

on:
pull_request_target:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can also update the submodule with this command.
### Build
If you want to build an APK, run the following command:
```
./gradlew :app:buildDebug
./gradlew :app:assembleDebug
```
The resulting APK will be stored in `app/build/outputs/apk/debug/app-debug.apk`.

Expand Down

0 comments on commit ef791c5

Please sign in to comment.