Skip to content

Commit 4c0bac1

Browse files
authored
chore: update screenshots on every push (#2667)
1 parent e9a9a43 commit 4c0bac1

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

Diff for: .github/actions/screenshot-android/action.yml

+17
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,23 @@ runs:
8282
disable-animations: true
8383
script: |
8484
bundle exec fastlane screengrab || exit 1
85+
86+
- name: Update Fastlane Metadata
87+
if: ${{ github.event_name == 'push' }}
88+
shell: bash
89+
run: |
90+
git config --global user.name "github-actions[bot]"
91+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
92+
93+
cd fastlane
94+
95+
# Force push to fastlane branch
96+
git checkout --orphan temporary
97+
git add --all .
98+
git commit -am "[Auto] Update screenshots ($(date +%Y-%m-%d.%H:%M:%S))"
99+
git branch -D fastlane-android
100+
git branch -m fastlane-android
101+
git push --force origin fastlane-android
85102
86103
- name: Upload Screenshots
87104
uses: actions/upload-artifact@v4

Diff for: .github/workflows/release.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,12 @@ jobs:
3232
read -r version_code < versionCode.txt
3333
echo "VERSION_CODE=$version_code" >> $GITHUB_OUTPUT
3434
35+
- name: Add Changelogs to fastlane branch
36+
run: |
3537
git config --global user.name "github-actions[bot]"
3638
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
39+
git clone --branch=fastlane-android --depth=1 https://${{ github.repository_owner }}:${{ github.token }}@github.com/${{ github.repository }} fastlane
3740
38-
- name: Android Screenshot Workflow
39-
uses: ./.github/actions/screenshot-android
40-
with:
41-
ANDROID_EMULATOR_API: ${{ env.ANDROID_EMULATOR_API }}
42-
ANDROID_EMULATOR_ARCH: ${{ env.ANDROID_EMULATOR_ARCH }}
43-
44-
- name: Add Changelogs to fastlane branch
45-
run: |
4641
cd fastlane
4742
4843
echo "${{ github.event.release.body }}" > metadata/android/en-US/changelogs/${{ steps.download-assets.outputs.VERSION_CODE }}.txt

0 commit comments

Comments
 (0)