Production Builds #23
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: Production Builds | |
on: | |
push: | |
tags: ['*'] | |
branches: ["master"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt install -y libncurses5 | |
- name: Checking out branch | |
uses: actions/checkout@v3 | |
- name: Setup Java for SDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup Java for gradlew | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- name: Decode Keystore and create keystore.properties | |
env: | |
ENCODED_STRING: ${{ secrets.KEYSTORE_BASE_64 }} | |
RELEASE_KEYSTORE_PASSWORD: ${{ secrets.RELEASE_KEYSTORE_PASSWORD }} | |
RELEASE_KEYSTORE_ALIAS: ${{ secrets.RELEASE_KEYSTORE_ALIAS }} | |
RELEASE_KEY_PASSWORD: ${{ secrets.RELEASE_KEY_PASSWORD }} | |
run: | | |
echo $ENCODED_STRING > keystore-b64.txt | |
base64 -d keystore-b64.txt > app/keystore.jks | |
echo "storePassword=$RELEASE_KEYSTORE_PASSWORD" >> keystore.properties | |
echo "keyPassword=$RELEASE_KEY_PASSWORD" >> keystore.properties | |
echo "keyAlias=$RELEASE_KEYSTORE_ALIAS" >> keystore.properties | |
echo "storeFile=keystore.jks" >> keystore.properties | |
- name: Build Release apk | |
run: ./gradlew assembleRelease --stacktrace | |
- name: Build Release bundle | |
run: ./gradlew bundleRelease --stacktrace | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
fail_on_unmatched_files: true | |
files: | | |
app/build/outputs/bundle/release/*.aab | |
app/build/outputs/apk/release/*.apk |