Skip to content

Build

Build #78

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
appBranch:
description: 'App GitHub branch to build'
required: true
default: 'master'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout App Branch
run: git checkout ${{ github.event.inputs.appBranch }}
- name: Setup Keystore
run: |
echo "${{ secrets.KEYSTORE }}" > release.b64
base64 -d release.b64 > release.keystore
- name: Create Version Code
id: version_code
run: |
echo "KEY=VALUE" >>$(git rev-list --count HEAD)
echo "VERSION_CODE $(git rev-list --count HEAD)"
- name: Build Application
run: |
./gradlew clean assembleRelease \
-PKEYSTORE=../release.keystore \
-PKEYSTORE_PASSWORD=${{ secrets.KEYSTORE_PASSWORD }} \
-PKEY_ALIAS=${{ secrets.KEY_ALIAS }} \
-PKEY_PASSWORD=${{ secrets.KEY_PASSWORD }} \
-PRELEASE_MAPS_API_KEY=${{ secrets.MAPS_API_KEY }} \
-PVERSION_CODE=${{ steps.version_code.outputs.value }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: mage-release.apk
path: mage/build/outputs/apk/release/mage-release.apk