Skip to content

Build sandbox app bundle #73

Build sandbox app bundle

Build sandbox app bundle #73

Workflow file for this run

name: Build sandbox app bundle
on:
workflow_dispatch:
inputs:
tramline-input:
description: "Tramline input"
required: false
jobs:
ci-checks:
if: github.event_name != 'pull_request'
uses: ./.github/workflows/ci_checks.yml
with:
run-build-checks: false
build_app_bundle:
runs-on: [ ubuntu-latest ]
env:
TERM: dumb
ORG_GRADLE_PROJECT_KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
ORG_GRADLE_PROJECT_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
ORG_GRADLE_PROJECT_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
steps:
- name: Configure Tramline
if: github.event.inputs.tramline-input != null && github.event.inputs.tramline-input != ''
id: tramline
uses: tramlinehq/[email protected]
with:
input: ${{ github.event.inputs.tramline-input }}
- name: Setup version code and name
if: github.event.inputs.tramline-input != null && github.event.inputs.tramline-input != ''
id: version_code_and_name
run: |
VERSION_NAME=${{ steps.tramline.outputs.version_name }}
VERSION_CODE=${{ steps.tramline.outputs.version_code }}
echo "ORG_GRADLE_PROJECT_VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
echo "ORG_GRADLE_PROJECT_VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV
- name: Checkout
if: github.event.inputs.tramline-input == null || github.event.inputs.tramline-input == ''
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: zulu
cache: 'gradle'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Decrypt secrets
run: gpg --batch --yes --quiet --decrypt --passphrase=${{ secrets.KEYSTORE_PASSPHRASE }} --output release/simple.store release/simple.gpg
- name: Build release bundle
run: |
./gradlew \
-PrunProguard=true \
-PmanifestEndpoint=${{ vars.MANIFEST_ENDPOINT_SANDBOX }} \
-PandroidNdkVersion=${{ vars.NDK_VERSION }} \
-PsentryDsn=${{ secrets.SENTRY_DSN }} \
-PsentryEnvironment=sandbox \
-PdatadogApplicationId=${{ secrets.DATADOG_APPLICATION_ID }} \
-PdatadogClientToken=${{ secrets.DATADOG_CLIENT_TOKEN }} \
-PdatadogEnvironment=sandbox \
-PsentryOrg=${{ vars.SENTRY_ORG }} \
-PsentryProject=${{ vars.SENTRY_PROJECT }} \
-PsentryAuthToken=${{ secrets.SENTRY_AUTH_TOKEN }} \
bundleSandboxRelease
- name: Upload release bundle
uses: actions/upload-artifact@v4
with:
name: release.aab
path: app/build/outputs/bundle/sandboxRelease/app-sandbox-release.aab
- name: Clean secrets
run: |
rm -f release/simple.store