Skip to content

7.2.1

7.2.1 #18

Workflow file for this run

name: Release
on:
release:
types: [published]
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: Setup Keystore
run: |
echo "${{ secrets.KEYSTORE }}" > release.b64
base64 -d release.b64 > release.keystore
- name: Create Version Code
id: version_code
run: |
git checkout master
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: Get Upload URL
id: url
run: |
url="https://api.github.com/repos/${GITHUB_REPOSITORY}/releases/tags/${GITHUB_REF#refs/tags/}"
echo ::set-output name=upload_url::$(curl -sL $url | jq -r '.upload_url')
- name: Upload Artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.url.outputs.upload_url }}
asset_path: mage/build/outputs/apk/release/mage-release.apk
asset_name: mage-release.apk
asset_content_type: application/octet-stream