Build #72
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 | |
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@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- 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 ::set-output name=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@v2 | |
with: | |
name: mage-defaults-release.apk | |
path: mage/build/outputs/apk/defaults/release/mage-defaults-release.apk |