Skip to content

Workflow file for this run

name: Generated APK AAB (Upload - Create Artifact To Github Action)
on:
push:
tags:
- 'v*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- uses: actions/setup-go@v5
with:
go-version: '>=1.23.0'
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.16.x'
- name: Set Up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
cache: 'gradle'
- name: Change wrapper permissions
run: chmod +x ./gradlew
# Create APK Release
- name: Build apk release project (APK)
run: ./gradlew assembleRelease
- name: Build archive
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
# Replace with the name of your binary
binary_name="uog-android"
dirname="$binary_name-${{ env.VERSION }}"
mkdir "$dirname"
mv "app/build/outputs/apk/release/app-release-unsigned.apk" "$dirname.apk"
echo "ASSET=$dirname.apk" >> $GITHUB_ENV
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
if: startsWith(github.ref, 'refs/tags/')
# ID used to access action output
id: sign_app
with:
releaseDirectory: ./
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
# override default build-tools version (33.0.0) -- optional
BUILD_TOOLS_VERSION: "34.0.0"
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
${{steps.sign_app.outputs.signedReleaseFile}}