Merge pull request #362 from PeriodPals/test/e2e/timer #161
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: AndroidBuild | |
on: | |
push: | |
branches: | |
- 'build/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4.1.0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3.13.0 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Grant execute permission for gradlew | |
run: | | |
chmod +x ./gradlew | |
- name: Setup secrets.properties | |
env: | |
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | |
SERVICE_KEY: ${{ secrets.SERVICE_KEY }} | |
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | |
POWERSYNC_URL: ${{ secrets.POWERSYNC_URL }} | |
STADIA_MAPS_KEY: ${{ secrets.STADIA_MAPS_KEY }} | |
STREAM_SDK_KEY: ${{ secrets.STREAM_SDK_KEY }} | |
STREAM_SDK_SECRET: ${{ secrets.STREAM_SDK_SECRET }} | |
run: | | |
sed -e "s|SAFE_DEFAULT_VALUE_SERVICE_KEY|$SERVICE_KEY|g;" \ | |
-e "s|SAFE_DEFAULT_VALUE_SUPABASE_KEY|$SUPABASE_KEY|g;" \ | |
-e "s|SAFE_DEFAULT_VALUE_SUPABASE_URL|$SUPABASE_URL|g;" \ | |
-e "s|SAFE_DEFAULT_VALUE_POWERSYNC_URL|$POWERSYNC_URL|g;" \ | |
-e "s|SAFE_DEFAULT_STADIA_MAPS_KEY|$STADIA_MAPS_KEY|g;" \ | |
-e "s|SAFE_DEFAULT_VALUE_STREAM_SDK_KEY|$STREAM_SDK_KEY|g;" \ | |
-e "s|SAFE_DEFAULT_VALUE_STREAM_SDK_SECRET|$STREAM_SDK_SECRET|g;" secrets.defaults.properties > secrets.properties | |
# Load google-services.json from the secrets | |
- name: Setup google-services.json | |
env: | |
GOOGLE_SERVICES: ${{ secrets.GOOGLE_SERVICES }} | |
run: | | |
echo "$GOOGLE_SERVICES" | base64 --decode > ./app/google-services.json | |
# Load service-account.json from the secrets | |
- name: Setup service-account.json | |
env: | |
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }} | |
run: | | |
echo "$SERVICE_ACCOUNT" | base64 --decode > ./supabase/functions/service-account.json | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v3.1.3 | |
with: | |
name: dsTemplate.apk | |
path: app/build/outputs/apk/debug/app-debug.apk | |
- name: Decode Keystore | |
run: echo "${{ secrets.KEYSTORE }}" | base64 --decode > /tmp/keystore.jks | |
- name: Build Release | |
run: ./gradlew assembleDebug |