-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.54 KB
/
build-artifacts.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
name: Build Artifacts
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Build with Gradle
run: ./gradlew gars:build -x lint
- name: Copy Release Artifacts
run: |
mkdir gars/build/release
cp gars/build/libs/*.jar gars/build/outputs/aar/*release.aar gars/build/release/
grep "version =" gars/build.gradle | sed 's/[a-z ="]//g' > VERSION
mv gars/build/release/*.aar gars/build/release/gars-android-$(cat VERSION).aar
- name: Build App with Gradle
run: ./gradlew app:assembleRelease -PRELEASE_MAPS_GARS_API_KEY=${{ secrets.RELEASE_MAPS_GARS_API_KEY }}
- name: Sign APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Copy Release Artifacts
run: |
grep "version =" gars/build.gradle | sed 's/[a-z ="]//g' > VERSION
cp app/build/outputs/apk/release/app-*-signed.apk "gars/build/release/gars-$(cat VERSION).apk"
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: gars-android
path: gars/build/release