Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Android Play Store release builds #25

Android Play Store release builds

Android Play Store release builds #25

name: Android Play Store release builds
on:
workflow_dispatch:
inputs:
tramline-input:
description: "Tramline input"
required: false
jobs:
build:
runs-on: ubuntu-latest
env:
TERM: dumb
ORG_GRADLE_PROJECT_PINNIT_KEYSTORE_PASSWORD: ${{ secrets.PINNIT_KEYSTORE_PASSWORD }}
ORG_GRADLE_PROJECT_PINNIT_KEY_PASSWORD: ${{ secrets.PINNIT_KEY_PASSWORD }}
steps:
- name: Configure Tramline
id: tramline
uses: tramlinehq/[email protected]
with:
input: ${{ github.event.inputs.tramline-input }}
- name: Setup versionName regardless of how this action is triggered
id: version_name
run: |
WORKFLOW_INPUT=${{ steps.tramline.outputs.version_name }}
VERSION_NAME=${WORKFLOW_INPUT:-"1.0.0"}
echo "ORG_GRADLE_PROJECT_VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
- name: Setup versionCode regardless of how this action is triggered
id: version_code
run: |
WORKFLOW_INPUT=${{ steps.tramline.outputs.version_code }}
VERSION_CODE=${WORKFLOW_INPUT:-"1"}
echo "ORG_GRADLE_PROJECT_VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: zulu
cache: 'gradle'
- name: Decrypt secrets
run: gpg --batch --yes --quiet --decrypt --passphrase=${{ secrets.ENCRYPT_KEY }} --output release/app-release.jks release/app-release.gpg
- name: Build release artifact
run: ./gradlew bundle
- name: Upload Release Bundle
uses: actions/upload-artifact@v4
with:
name: release-aab
path: app/build/outputs/bundle/release/app-release.aab
- name: Clean secrets
run: |
rm -f release/app-release.jks