Skip to content

Use keys from the environment #8

Use keys from the environment

Use keys from the environment #8

Workflow file for this run

name: Build APK
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: buildapk
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Gradle
run: bash build.sh
- name: Align and Sign Release
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
if: ${{ env.SIGNING_KEY != null }}
continue-on-error: true
uses: noriban/sign-android-release@v5.1
id: sign_app
with:
releaseDirectory: app/build/outputs/apk/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
- name: Upload build artifact
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
if: ${{ steps.sign_app.outcome == 'success' && env.SIGNING_KEY != null }}
uses: actions/upload-artifact@v4
with:
name: Vojazento
path: ${{ steps.sign_app.outputs.signedReleaseFile }}