Skip to content

Commit a06d8fc

Browse files
committed
ADD debug build workflow
1 parent af819e4 commit a06d8fc

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

.github/workflows/debug.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Debug Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ '*' ] # run on all pushes on any branch
7+
8+
jobs:
9+
build:
10+
runs-on: macos-latest # use [ self-hosted, macOS ] to host on our own mac mini, which is twice as fast and cheaper than hosting on a github runner. See README for more info.
11+
permissions: # TODO still needed?
12+
packages: read
13+
contents: read
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Setup Java
18+
uses: actions/setup-java@v3
19+
with:
20+
distribution: "corretto"
21+
java-version: "21" # keep the same as your Android Studio version
22+
cache: "gradle"
23+
24+
- name: Setup Android SDK
25+
uses: android-actions/setup-android@v2.0.10
26+
27+
- name: Update Version Code # we increase the version code with each build
28+
uses: chkfung/android-version-actions@v1.1
29+
with:
30+
gradlePath: app/build.gradle
31+
versionCode: ${{ github.run_number }}
32+
33+
# - name: Prepare build
34+
# uses: ./.github/workflows/prepare
35+
36+
- name: Build Debug APK
37+
run: ./gradlew assembleDebug --stacktrace
38+
39+
- name: Upload Debug APK to Artifacts
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: ${{ github.run_number }}_apk_debug
43+
path: |
44+
${{ github.workspace }}/app/build/outputs/apk/debug/app-debug.apk
45+
46+
- name: Build Debug Bundle
47+
run: ./gradlew bundleDebug --stacktrace
48+
49+
- name: Upload Debug Bundle to Artifacts
50+
uses: actions/upload-artifact@v3
51+
with:
52+
name: ${{ github.run_number }}_apk_debug
53+
path: |
54+
${{ github.workspace }}/app/build/outputs/bundle/debug/app-debug.aab

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Release Build
2-
# Preparation steps that can be used in other steps and workflows.
2+
33
on:
44
workflow_dispatch:
55
inputs:

0 commit comments

Comments
 (0)