Skip to content

Commit a79c98d

Browse files
committed
Add screenshot update task
1 parent ad6d828 commit a79c98d

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Update screenshot
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
updateScreenshot:
8+
runs-on: macos-latest
9+
env:
10+
CCDROIDX_RELEASE_KEYSTORE_PASSWORD: ${{ secrets.CCDROIDX_RELEASE_KEYSTORE_PASSWORD }}
11+
CCDROIDX_RELEASE_KEY_ALIAS: ${{ secrets.CCDROIDX_RELEASE_KEY_ALIAS }}
12+
CCDROIDX_RELEASE_KEY_ALIAS_PASSWORD: ${{ secrets.CCDROIDX_RELEASE_KEY_ALIAS_PASSWORD }}
13+
CCDROIDX_RELEASE_KEYSTORE_PATH: release.keystore
14+
GOOGLE_SERVICE_JSON: ${{ secrets.GOOGLE_SERVICE_JSON }}
15+
timeout-minutes: 90
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Validate Gradle Wrapper
21+
uses: gradle/wrapper-validation-action@v1
22+
23+
- name: Stub release keystore file
24+
run: |
25+
touch release.keystore
26+
27+
- name: Decrypt google service json
28+
run: |
29+
TMP_GOOGLE_SERVICE_JSON_DIR="${RUNNER_TEMP}"/play
30+
mkdir "${TMP_GOOGLE_SERVICE_JSON_DIR}"
31+
echo $GOOGLE_SERVICE_JSON | base64 -D > "${TMP_GOOGLE_SERVICE_JSON_DIR}"/google-services.json
32+
mv "${TMP_GOOGLE_SERVICE_JSON_DIR}"/google-services.json app/google-services.json
33+
34+
- name: Set up JDK 17
35+
uses: actions/setup-java@v3
36+
with:
37+
distribution: 'temurin'
38+
java-version: '17'
39+
40+
- name: Accept Android licenses
41+
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
42+
43+
- name: Set up Gradle
44+
uses: gradle/gradle-build-action@v2
45+
46+
- name: Record Screenshot
47+
run: ./gradlew app:recordRoborazziFlossDebug
48+
49+
- name: Create Pull Request
50+
uses: peter-evans/create-pull-request@v6
51+
with:
52+
commit-message: Updating Failing Screenshots
53+
branch: update-screenshot
54+
branch-suffix : short-commit-hash
55+
title: Update Screenshot - Automated PR to update screenshot
56+
body: Automated task to update image references for screenshot testing
57+
labels: automated pr
58+
reviewers: vincent-paing

gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ kotlin.code.style=official
2323
android.nonTransitiveRClass=true
2424
android.defaults.buildfeatures.buildconfig=true
2525
android.nonFinalResIds=false
26+
27+
roborazzi.contextdata=false

0 commit comments

Comments
 (0)