Release update #1194
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: Release update | |
on: | |
workflow_dispatch: | |
inputs: | |
subdomain: | |
description: "Enter the institute's subdomain or all to release update(all -> deploy update for all institute)" | |
required: true | |
default: "all" | |
jobs: | |
release_update: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_ACCESS_KEY: ${{ secrets.GH_ACCESS_KEY }} | |
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }} | |
API_ACCESS_KEY: ${{ secrets.API_ACCESS_KEY }} | |
steps: | |
- name: Validate subdomain | |
if: ${{ github.event.inputs.subdomain }} != 'all' | |
run: | | |
curl -f https://${{ github.event.inputs.subdomain }}.testpress.in/api/v2.5/admin/android/app-config/ -H "API-access-key: $API_ACCESS_KEY" | |
- name: Setup JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "corretto" | |
java-version: 11 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Caching Gradle packages | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Checkout the repository | |
uses: actions/checkout@v2 | |
- name: Setup ruby and fastlane | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: Cache Zoom SDK files | |
id: zoom-cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
./mobilertc | |
./commonlib | |
key: zoom_sdk_files | |
- name: Setup Zoom SDK | |
if: steps.zoom-cache.outputs.cache-hit != 'true' | |
run: | | |
wget https://media.testpress.in/static/android/zoom_sdk.zip | |
unzip -o ./zoom_sdk.zip | |
- name: Build and deploy app | |
run: | | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
bundle exec fastlane release_update_to subdomain:${{ github.event.inputs.subdomain }} | |
- name: Store app artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app | |
path: | | |
app/build/outputs/apk/release/app-release.apk | |
app/build/outputs/bundle/release/app-release.aab | |
app/build/outputs/apk/debug/app-debug.apk |