Skip to content

feat: Firebase App Distribution #15

feat: Firebase App Distribution

feat: Firebase App Distribution #15

name: '🔥 Firebase App Distribution'
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
# To be removed after tests
pull_request:
branches: ["main"]
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ github.workspace }}/firebase-service-account.json
jobs:
publish:

Check failure on line 16 in .github/workflows/firebase-app-distribution.yml

View workflow run for this annotation

GitHub Actions / 🔥 Firebase App Distribution

Invalid workflow file

The workflow is not valid. .github/workflows/firebase-app-distribution.yml (Line: 16, Col: 3): The workflow must contain at least one job with no dependencies.
if: github.repository == 'adevinta/spark-android'
needs: validation
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
with:
lfs: true
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: ./.github/actions/setup-gradle-properties
- run: |
echo "$KEYSTORE_BASE64" | base64 --decode > "$KEYSTORE_FILE"
echo storeFile="$KEYSTORE_FILE" >> keystore.properties
echo storePassword="$KEYSTORE_PASSWORD" >> keystore.properties
echo keyAlias="$KEYSTORE_KEY_ALIAS" >> keystore.properties
echo keyPassword="$KEYSTORE_KEY_PASSWORD" >> keystore.properties
env:
KEYSTORE_FILE: ${{ github.workspace }}/keystore.jks
KEYSTORE_BASE64: ${{ secrets.KEYSTORE }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: spark
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_ALIAS_PASSWORD }}
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm install -g [email protected]
- run: echo "$FIREBASE_SERVICE_ACCOUNT" > "firebase-service-account.json"
env:
FIREBASE_SERVICE_ACCOUNT: ${{ secrets.FIREBASE_SERVICE_ACCOUNT }}
- name: '🐘 Setup Gradle'
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2.7.0
with:
gradle-home-cache-cleanup: true
- name: '👷 Build'
run: ./gradlew :catalog:assembleRelease
- name: '📦 Archive APKs'
uses: actions/upload-artifact@v3
with:
name: apk
path: '**/build/outputs/apk/**/*.apk'
- name: '🚀 Publish'
run: >-
firebase appdistribution:distribute
catalog/build/outputs/apk/release/catalog-release.apk
--app "1:559109812471:android:7aaf1a8ba28904f5f923f2"
--groups "all"
- name: '♻️ Cleanup'
if: ${{ success() || failure() }}
continue-on-error: true
run: |
rm keystore.jks
rm firebase-service-account.json