-
Notifications
You must be signed in to change notification settings - Fork 2
35 lines (33 loc) · 1.08 KB
/
build.yaml
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
name: Build
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/gradle-build-action@v2
- run: |
osName="${RUNNER_OS,,}}"
[[ "$osName" == 'linux' ]] || osName="${osName:0:3}"
echo "BUILD_ID=$GITHUB_RUN_NUMBER.$osName" >> "$GITHUB_ENV"
shell: bash
- run: ./gradlew build
- uses: actions/upload-artifact@v3
with:
name: build-outputs-${{ env.BUILD_ID }
path: app/build/outputs/
- run:
jq -er '.elements[].outputFile|sub("(-unsigned)?(\\.apk)?$";"")' app/build/outputs/apk/debug/output-metadata.json
jq -er '.elements[].outputFile|sub("(-unsigned)?(\\.apk)?$";"")' app/build/outputs/apk/release/output-metadata.json
- uses: actions/upload-artifact@v3
with:
name: apks
path: app/build/outputs/*/*.apk