CI integration #1
Workflow file for this run
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, Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build_release: | |
environment: production | |
runs-on: ubuntu-latest | |
steps: | |
# set up env | |
- uses: actions/checkout@v4 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Generate keystore.properties | |
run: | | |
cat <<EOF > keystore.properties | |
storeFile:${{ vars.KEYSTORE_STORE_FILE_PATH }} | |
storePassword:${{ secrets.KEYSTORE_STORE_PASSWORD }} | |
keyAlias:${{ secrets.KEYSTORE_KEY_ALIAS }} | |
keyPassword:${{ secrets.KEYSTORE_KEY_PASSWORD }} | |
EOF | |
- name: Generate keystore.jks | |
run: echo "${{ secrets.KEYSTORE_JKS_BASE64 }}" | base64 --decode > keystore.jks | |
- name: Generate google-services.json | |
run: echo "${{ secrets.GOOGLE_SERVICES_BASE64 }}" | base64 --decode > app/google-services.json | |
# APK for Github Release | |
- name: Build release APK | |
run: ./gradlew assembleRelease --no-daemon | |
- name: Release APK | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: app/build/outputs/apk/release/app-release.apk | |
# AAB for Google Play | |
- name: Build Release AAB | |
run: ./gradlew bundleRelease --no-daemon | |
- name: Upload AAB | |
uses: actions/upload-artifact@v4 | |
with: | |
name: subspace | |
path: app/build/outputs/bundle/release/app-release.aab | |