Skip to content

Release 1.0.0 (#33)

Release 1.0.0 (#33) #5

Workflow file for this run

name: Build release packages for Google Play and standalone publishing
on:
push:
# Run for releases and release candidates.
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+rc.[0-9]+'
workflow_dispatch:
env:
java_version: "17"
jobs:
build:
runs-on: ubuntu-latest
environment:
name: Releases
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create signing configuration files
run: |
echo "$PLAY_UPLOAD_SIGNING_PROPERTIES" > app/play-upload-signing.properties
echo "$STANDALONE_RELEASE_SIGNING_PROPERTIES" > app/standalone-release-signing.properties
shell: bash
env:
PLAY_UPLOAD_SIGNING_PROPERTIES: ${{secrets.PLAY_UPLOAD_SIGNING_PROPERTIES}}
STANDALONE_RELEASE_SIGNING_PROPERTIES: ${{secrets.STANDALONE_RELEASE_SIGNING_PROPERTIES}}
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: "${{env.java_version}}"
distribution: corretto
- name: Check if build version matches the tag
run: |
buildVersion="$(./gradlew -q printVersionName)"
tagVersion="${GITHUB_REF#refs/tags/}"
if [ "$buildVersion" != "$tagVersion" ]; then
echo "Build version '$buildVersion' doesn't match the tag '$tagVersion'"
exit 1
fi
shell: bash
env:
SOURCE_TAG: ${{ steps.branch_name.outputs.SOURCE_TAG }}
- name: Build Testnet APK for standalone release
run: ./gradlew app:assembleTstnetRelease --stacktrace
env:
CONFIGURABLE_SIGNING_PROPERTIES_FILE: standalone-release-signing.properties
- name: Build Testnet bundle for Google Play upload
run: ./gradlew app:bundleTstnetRelease --stacktrace
env:
CONFIGURABLE_SIGNING_PROPERTIES_FILE: play-upload-signing.properties
- name: Build Mainnet APK for standalone release
run: ./gradlew app:assembleMainnetRelease --stacktrace
env:
CONFIGURABLE_SIGNING_PROPERTIES_FILE: standalone-release-signing.properties
- name: Build Mainnet bundle for Google Play upload
run: ./gradlew app:bundleMainnetRelease --stacktrace
env:
CONFIGURABLE_SIGNING_PROPERTIES_FILE: play-upload-signing.properties
- name: Upload the APKs and bundles
uses: actions/upload-artifact@v4
with:
name: APKs and bundles
path: |
app/build/outputs/**/*.apk
app/build/outputs/**/*.aab
compression-level: 0