lint #2
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-CUSTOMTHEME | |
on: | |
push: | |
branches: | |
- 'eastshine2741/custom-theme' | |
jobs: | |
cancel-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
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 gcp-service-account.json (Staging) | |
run: | | |
cat << EOF > ./gcp-service-account-staging.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 production 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 | |
- name: Slack Upload APK | |
uses: MeilCli/slack-upload-file@v3 | |
with: | |
slack_token: ${{ secrets.SLACK_READ_WRITE_TOKEN }} | |
channel_id: ${{ secrets.SLACK_DEPLOY_CHANNEL_ID }} | |
file_path: './app/build/outputs/apk/staging/release/app-staging-release.apk' | |
file_name: 'app-staging-release.apk' | |
file_type: 'apk' | |
initial_comment: 'staging-release APK' |