Release #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
title: | |
type: string | |
description: 'Title' | |
required: true | |
default: 'v0.00.0 R0' | |
is_pre_release: | |
type: boolean | |
description: 'Set as a pre-release' | |
required: true | |
default: true | |
jobs: | |
build-and-release: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout branch "${{ github.ref_name }}" | |
run: | | |
git clone --no-checkout https://github.com/TheBSODAndWSODFan/Tubular-Test.git . | |
git config core.symlinks false | |
git checkout --progress --force ${{ github.ref_name }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: "temurin" | |
cache: 'gradle' | |
- name: Build release APK | |
run: ./gradlew assembleRelease | |
- name: Sign APK | |
env: | |
KEYSTORE: ${{ secrets.KEYSTORE }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
run: | | |
version=$( grep "versionName" app/build.gradle | awk -F'"' '{print $2}' ) | |
echo "${KEYSTORE}" | base64 -d > apksign.keystore | |
${ANDROID_HOME}/build-tools/34.0.0/apksigner sign --ks apksign.keystore --ks-pass env:SIGNING_STORE_PASSWORD "app/build/outputs/apk/release/app-release-unsigned.apk" | |
mv app/build/outputs/apk/release/app-release-unsigned.apk app/build/outputs/apk/release/"tubular_v${version}.apk" | |
- name: Upload APK | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app | |
path: app/build/outputs/apk/release/*.apk | |
- name: Archive reports for job | |
uses: actions/upload-artifact@v4 | |
with: | |
name: reports | |
path: '*/build/reports' | |
if: ${{ always() }} |