60 lines
1.9 KiB
YAML
60 lines
1.9 KiB
YAML
name: Push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "*"
|
|
tags:
|
|
- "*"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Generate App Bundle
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: set up JDK
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: "17"
|
|
distribution: "temurin"
|
|
cache: gradle
|
|
- name: Make gradle executable
|
|
run: chmod +x gradlew
|
|
- name: Create env props
|
|
run: |
|
|
echo "apiUrl=${{ secrets.API_URL }}" > env.properties
|
|
echo "apiKey=${{ secrets.API_KEY }}" >> env.properties
|
|
- name: Bundle 'release' with Gradle
|
|
run: |
|
|
./gradlew assembleDebug
|
|
- name: Setup build tool version variable
|
|
shell: bash
|
|
run: |
|
|
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1)
|
|
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV
|
|
echo Last build tool version is: $BUILD_TOOL_VERSION
|
|
- name: Sign package
|
|
id: sign
|
|
uses: r0adkll/sign-android-release@v1
|
|
with:
|
|
releaseDirectory: app/build/outputs/apk/debug
|
|
signingKeyBase64: ${{ secrets.SIGNING_KEYSTORE }}
|
|
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
|
|
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
|
|
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
|
|
env:
|
|
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }}
|
|
- run: echo "Build status report=${{ job.status }}."
|
|
- name: Upload App Bundle
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: signed_apk
|
|
path: ${{steps.sign.outputs.signedReleaseFile}}
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: ${{steps.sign.outputs.signedReleaseFile}}
|