-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (53 loc) · 2.01 KB
/
build-apk.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
50
51
52
53
54
55
56
57
58
59
60
61
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Release APK
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ published ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout my repository
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
cache: 'gradle'
- name: Decode keystore.jks
shell: bash
env:
ANDROID_SIGNING_RELEASE_STORE_BASE64: ${{ secrets.ANDROID_SIGNING_RELEASE_STORE_BASE64 }}
run: |
echo $ANDROID_SIGNING_RELEASE_STORE_BASE64 | base64 --decode > keystore.jks
- name: Build Apk
env:
ANDROID_SIGNING_RELEASE_KEY_ALIAS: ${{ secrets.ANDROID_SIGNING_RELEASE_KEY_ALIAS }}
ANDROID_SIGNING_RELEASE_KEY_PASSWORD: ${{ secrets.ANDROID_SIGNING_RELEASE_KEY_PASSWORD }}
ANDROID_SIGNING_RELEASE_STORE_PASSWORD: ${{ secrets.ANDROID_SIGNING_RELEASE_STORE_PASSWORD }}
run: |
./gradlew composeApp:assembleRelease
- name: Upload the Build Artifact
uses: actions/[email protected]
with:
name: distribution
path: composeApp/build/outputs/apk/release/*.apk
- name: Upload Release Assets
if: ${{ github.event_name == 'release' }}
uses: AButler/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
files: composeApp/build/outputs/apk/release/*.apk