This repository has been archived by the owner on Jan 25, 2025. It is now read-only.
Use keys from the environment #20
Workflow file for this run
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: 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/[email protected] | |
id: sign_app | |
with: | |
releaseDirectory: release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Print variables | |
run: echo ${{ steps.sign_app.outputs.signedReleaseFile0 }}, {{ SIGNED_RELEASE_FILE_0 }}, ${{ steps.sign_app.outputs.signedReleaseFile1 }}, {{ SIGNED_RELEASE_FILE_1 }} | |
- 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.signedReleaseFile0 }} | |
${{ steps.sign_app.outputs.signedReleaseFile1 }} |