From 0d2680c10b88b19f321ca21e60f4ffb1c93cc7a7 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Fri, 7 Feb 2025 22:51:18 +0530 Subject: [PATCH] fix: add google services json to workflow (#268) --- .github/workflows/pull_requests.yml | 5 +++++ .github/workflows/release.yml | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_requests.yml b/.github/workflows/pull_requests.yml index 1b93858..985b19b 100644 --- a/.github/workflows/pull_requests.yml +++ b/.github/workflows/pull_requests.yml @@ -29,8 +29,13 @@ jobs: - name: ๐Ÿ“ฆ Install dependencies run: yarn install + - name: ๐Ÿ— Create google-services.json file + run: echo "${{ secrets.GOOGLE_SERVICES_JSON_B64 }}" | base64 -d > ./google-services.json + - name: ๐Ÿš€ Build app run: eas build --non-interactive --platform android --local --profile preview --output=./app-release.apk + env: + GOOGLE_SERVICES_JSON: "/home/runner/work/go/go/google-services.json" - name: ๐Ÿงช Run tests run: yarn test:ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25d7dce..cd43ff6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Release tag on: push: tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 jobs: draft_release: @@ -22,7 +22,7 @@ jobs: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: true -# prerelease: true + # prerelease: true build_android: needs: [draft_release] @@ -52,8 +52,13 @@ jobs: - name: ๐Ÿ“ฆ Install dependencies run: yarn install + - name: ๐Ÿ— Create google-services.json file + run: echo "${{ secrets.GOOGLE_SERVICES_JSON_B64 }}" | base64 -d > ./google-services.json + - name: ๐Ÿš€ Build app run: eas build --non-interactive --platform android --local --profile production_apk --output=./app-release.apk + env: + GOOGLE_SERVICES_JSON: "/home/runner/work/go/go/google-services.json" - name: Upload Artifact uses: actions/upload-artifact@v4 @@ -71,7 +76,6 @@ jobs: asset_path: ./app-release.apk asset_name: alby-go-${{ github.ref_name }}-android.apk asset_content_type: application/vnd.android.package-archive - # publish-release: # needs: [release, build_android] # runs-on: ubuntu-latest