Skip to content

ci: fix release apk path #20

ci: fix release apk path

ci: fix release apk path #20

Workflow file for this run

name: ci
on:
push:
branches: [master]
tags:
- "*"
pull_request:
branches: [master]
jobs:
build:
if: ${{ ! startsWith(github.ref, 'refs/tags/') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: gradle/wrapper-validation-action@v2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Set up CMake and Ninja
uses: lukka/get-cmake@latest
- name: Build with Gradle (Debug)
run: ./gradlew clean && ./gradlew assembleDebug
- uses: actions/upload-artifact@v4
with:
name: knoxvnc-debug.apk
path: app/build/outputs/apk/debug/app-debug.apk
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: gradle/wrapper-validation-action@v2
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Set up CMake and Ninja
uses: lukka/get-cmake@latest
- name: Build with Gradle (Release)
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
run: |
echo $KEYSTORE_BASE64 | base64 --decode > release.keystore
./gradlew clean && ./gradlew assembleRelease
- name: Get release version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: app/build/outputs/apk/release/app-release.apk