Skip to content

ci: Setup workflows to build all variants in the app (WPB-8644) #12

ci: Setup workflows to build all variants in the app (WPB-8644)

ci: Setup workflows to build all variants in the app (WPB-8644) #12

name: "Develop app"
on:
push:
branches:
- develop
pull_request:
branches:
- develop
types: [ opened, synchronize ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
# code-analysis:
# needs: [ detekt ]
# uses: ./.github/workflows/code-analysis.yml
build-app:
# needs: [ detekt ]
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive # Needed in order to fetch Kalium sources for building
fetch-depth: 0
- name: Set up JDK 17
uses: buildjet/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
# - name: Decode release Keystore
# env:
# ENCODED_STRING: ${{ secrets.ENCODED_KEYSTORE_PRE_RELEASE }}
# run: |
# TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
# mkdir "${TMP_KEYSTORE_FILE_PATH}"
# echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/key.keystore
# - name: build staging flavour
# run:
# ./gradlew app:assembleStagingRelease -p ./ --no-daemon
# env:
# KEYSTORE_KEY_NAME_RELEASE: ${{ secrets.SIGNING_KEY_ALIAS_PRE_RELEASE }}
# KEYPWD_RELEASE: ${{ secrets.SIGNING_KEY_PASSWORD_PRE_RELEASE }}
# KEYSTOREPWD_RELEASE: ${{ secrets.SIGNING_STORE_PASSWORD_PRE_RELEASE }}
# ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Decode debug Keystore
env:
ENCODED_STRING: ${{ secrets.ENCODED_KEYSTORE_DEBUG }}
run: |
TMP_KEYSTORE_FILE_PATH="${RUNNER_TEMP}"/keystore
mkdir "${TMP_KEYSTORE_FILE_PATH}"
echo $ENCODED_STRING | base64 -di > "${TMP_KEYSTORE_FILE_PATH}"/key.keystore
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: build dev flavour
run:
./gradlew app:assembleDevDebug -p ./ --no-daemon
env:
KEYSTORE_KEY_NAME_DEBUG: ${{ secrets.SIGNING_KEY_ALIAS_DEBUG }}
KEYPWD_DEBUG: ${{ secrets.SIGNING_KEY_PASSWORD_DEBUG }}
KEYSTOREPWD_DEBUG: ${{ secrets.SIGNING_STORE_PASSWORD_DEBUG }}
ENABLE_SIGNING: ${{ secrets.ENABLE_SIGNING }}
- name: Upload
if: success()
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: app/build/outputs/