-
Notifications
You must be signed in to change notification settings - Fork 19
46 lines (44 loc) 路 1.53 KB
/
build-app.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
name: "Build App"
on:
workflow_call:
inputs:
flavour:
required: true
type: string
jobs:
build-app:
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Build beta flavour
if: ${{ inputs.flavour == 'beta-debug' }}
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew assembleBetaDebug -p ./ --no-daemon
cp app/build/outputs/apk/beta/debug/com.wire.*.apk wire-android-${{inputs.flavour}}-pr-${{ github.event.pull_request.number }}.apk
- name: Build dev flavour
if: ${{ inputs.flavour == 'dev-debug' }}
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
./gradlew assembleDevDebug -p ./ --no-daemon
cp app/build/outputs/apk/dev/debug/com.wire.*.apk wire-android-${{inputs.flavour}}-pr-${{ github.event.pull_request.number }}.apk
- name: Upload APK
if: success()
uses: actions/upload-artifact@v3
with:
name: wire-android-${{inputs.flavour}}-pr-${{ github.event.pull_request.number }}.apk
path: ./wire-android-${{inputs.flavour}}-pr-${{ github.event.pull_request.number }}.apk