release Siksha 3.2.0-rc.1 #32
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: CD | |
on: | |
push: | |
branches: | |
- 'release-*' | |
paths: | |
- 'version.properties' | |
jobs: | |
build-live: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
- name: Clean build | |
run: ./gradlew clean | |
- name: Setup google-services.json (Live) | |
run: | | |
mkdir -p ./app/src/live | |
cat << EOF > ./app/src/live/google-services.json | |
${{ secrets.google_services_json }} | |
EOF | |
- name: Setup app-distribution-service-account.json (Live) | |
run: | | |
cat << EOF > ./app/src/live/app-distribution-service-account.json | |
${{ secrets.app_distribution_service_account }} | |
EOF | |
- name: Setup secrets.xml (Live) | |
run: | | |
mkdir -p ./app/src/live/res/values | |
cat << EOF > ./app/src/live/res/values/secrets.xml | |
${{ secrets.secrets_xml_live }} | |
EOF | |
- name: Decode Keystore | |
env: | |
ENCODED_STRING: ${{ secrets.KEYSTORE }} | |
run: | | |
mkdir -p ./app/keystore | |
echo $ENCODED_STRING | base64 -di > ./app/keystore/android.jks | |
- name: Build production apk and upload | |
run: ./gradlew assembleLiveRelease appDistributionUploadLiveRelease | |
env: | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
build-staging: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
- name: Clean build | |
run: ./gradlew clean | |
- name: Setup google-services.json (Staging) | |
run: | | |
mkdir -p ./app/src/staging | |
cat << EOF > ./app/src/staging/google-services.json | |
${{ secrets.google_services_json_staging }} | |
EOF | |
- name: Setup app-distribution-service-account.json (Staging) | |
run: | | |
cat << EOF > ./app/src/staging/app-distribution-service-account.json | |
${{ secrets.app_distribution_service_account_staging }} | |
EOF | |
- name: Setup secrets.xml (Staging) | |
run: | | |
mkdir -p ./app/src/staging/res/values | |
cat << EOF > ./app/src/staging/res/values/secrets.xml | |
${{ secrets.secrets_xml_staging }} | |
EOF | |
- name: Decode Keystore | |
env: | |
ENCODED_STRING: ${{ secrets.KEYSTORE }} | |
run: | | |
mkdir -p ./app/keystore | |
echo $ENCODED_STRING | base64 -di > ./app/keystore/android.jks | |
- name: Build staging apk | |
run: ./gradlew assembleStagingRelease | |
env: | |
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
- name: Upload artifact to Firebase App Distribution | |
run: ./gradlew appDistributionUploadStagingRelease |