From 62ef8c660199a90457700073ea37634086d635c0 Mon Sep 17 00:00:00 2001 From: JackEblan Date: Sat, 5 Oct 2024 09:06:25 +0800 Subject: [PATCH 1/2] The step for creating json file seems wrong so we shorten it. --- .github/workflows/Build.yml | 9 ++------- .github/workflows/NightlyBaselineProfiles.yaml | 5 +---- .github/workflows/Release.yml | 4 +--- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 44c0f3e..2ed88d5 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -117,12 +117,9 @@ jobs: commit_message: "🤖 Updates screenshots" - name: Google Services JSON file - if: always() env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: | - cat /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json | base64 - echo $DATA > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json - name: Run local tests run: ./gradlew testDebug :lint:test @@ -223,9 +220,7 @@ jobs: - name: Google Services JSON file env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: | - cat /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json | base64 - echo $DATA > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json - name: Build projects and run instrumentation tests uses: reactivecircus/android-emulator-runner@v2 diff --git a/.github/workflows/NightlyBaselineProfiles.yaml b/.github/workflows/NightlyBaselineProfiles.yaml index 4c40f28..ca1abbc 100644 --- a/.github/workflows/NightlyBaselineProfiles.yaml +++ b/.github/workflows/NightlyBaselineProfiles.yaml @@ -50,12 +50,9 @@ jobs: run: ./gradlew check -p build-logic - name: Google Services JSON file - if: always() env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: | - cat /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json | base64 - echo $DATA > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json - name: Setup GMD run: ./gradlew :benchmarks:pixel6Api33Setup diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index bb5e36e..31b5937 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -57,9 +57,7 @@ jobs: - name: Google Services JSON file env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: | - cat /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json | base64 - echo $DATA > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json - name: Build release variant including baseline profile generation run: ./gradlew :app:assembleRelease :app:bundleRelease From f6e560901b78e9fbd1e9d3e0997561c55f1c3176 Mon Sep 17 00:00:00 2001 From: JackEblan Date: Sat, 5 Oct 2024 09:16:19 +0800 Subject: [PATCH 2/2] Test 1 --- .github/workflows/Build.yml | 4 ++-- .github/workflows/NightlyBaselineProfiles.yaml | 2 +- .github/workflows/Release.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 2ed88d5..6b2974c 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -119,7 +119,7 @@ jobs: - name: Google Services JSON file env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 -di > app/google-services.json - name: Run local tests run: ./gradlew testDebug :lint:test @@ -220,7 +220,7 @@ jobs: - name: Google Services JSON file env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 -di > app/google-services.json - name: Build projects and run instrumentation tests uses: reactivecircus/android-emulator-runner@v2 diff --git a/.github/workflows/NightlyBaselineProfiles.yaml b/.github/workflows/NightlyBaselineProfiles.yaml index ca1abbc..7d3f50a 100644 --- a/.github/workflows/NightlyBaselineProfiles.yaml +++ b/.github/workflows/NightlyBaselineProfiles.yaml @@ -52,7 +52,7 @@ jobs: - name: Google Services JSON file env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 -di > app/google-services.json - name: Setup GMD run: ./gradlew :benchmarks:pixel6Api33Setup diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 31b5937..602deba 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -57,7 +57,7 @@ jobs: - name: Google Services JSON file env: DATA: ${{ secrets.GOOGLE_SERVICES_JSON }} - run: echo $DATA | base64 --decode > /home/runner/work/SocialWorkReviewer/SocialWorkReviewer/app/google-services.json + run: echo $DATA | base64 -di > app/google-services.json - name: Build release variant including baseline profile generation run: ./gradlew :app:assembleRelease :app:bundleRelease