-
Notifications
You must be signed in to change notification settings - Fork 19
36 lines (35 loc) · 1.14 KB
/
release-demo-app-apk.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
36
name: Release demo app APK
# add demo app APK to the latest release
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Build APK
env:
DEMO_APP_KEYSTORE_PASSWORD: ${{ secrets.DEMO_APP_KEYSTORE_PASSWORD }}
APK_KEY_PASSWORD: ${{ secrets.APK_KEY_PASSWORD }}
run: ./gradlew :demoApp:composeApp:assembleRelease --stacktrace
- name: Get latest release
id: latest_release
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
excludes: prerelease, draft
- name: Upload APK
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.latest_release.outputs.release }} demoApp/composeApp/build/outputs/apk/release/composeApp-release.apk#demoApp.apk --clobber