File tree Expand file tree Collapse file tree 2 files changed +56
-17
lines changed
Expand file tree Collapse file tree 2 files changed +56
-17
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,12 @@ jobs:
1818 # uses: ./.github/workflows/02-conventional-release.yml
1919 # secrets: inherit
2020
21- # TODO: implement automatic screenshots
22- # parse-screenshot:
23- # uses: ./.github/workflows/11-parse-screenshot.yml
24- # with:
25- # # Set to empty string to always take screenshots
26- # screenshot-text: "SCREENSHOT "
21+ parse-screenshot :
22+ uses : ./.github/workflows/01- parse-screenshot.yml
23+ with :
24+ # Set to empty string to always take screenshots
25+ # screenshot-text: "SCREENSHOT"
26+ screenshot-text : " "
2727
2828# build-android:
2929 # set if false to disable android branch of build
@@ -66,14 +66,14 @@ jobs:
6666# new_release_notes: "test release notes"
6767# secrets: inherit
6868
69- upload-ios :
70- # if: ${{ needs.parse-screenshot.outputs.contains_screenshot == 'false' }}
71- needs :
72- # - parse-screenshot
73- - build-ios
74- # - conventional-release
75- uses : ./.github/workflows/04-upload-ios.yml
76- with :
77- new_release : " v1.0.1"
78- new_release_notes : " test release notes"
79- secrets : inherit
69+ # upload-ios:
70+ # # if: ${{ needs.parse-screenshot.outputs.contains_screenshot == 'false' }}
71+ # needs:
72+ # # - parse-screenshot
73+ # - build-ios
74+ # # - conventional-release
75+ # uses: ./.github/workflows/04-upload-ios.yml
76+ # with:
77+ # new_release: "v1.0.1"
78+ # new_release_notes: "test release notes"
79+ # secrets: inherit
Original file line number Diff line number Diff line change 1+ name : parse-screenshot
2+
3+ on :
4+ workflow_call :
5+ inputs :
6+ screenshot-text :
7+ description : ' Text to search for in commit message'
8+ required : true
9+ type : string
10+ outputs :
11+ contains_screenshot :
12+ description : ' If commit message contains screenshot keyword'
13+ value : ${{ jobs.check_commit_message.outputs.contains_screenshot }}
14+
15+ jobs :
16+ check_commit_message :
17+ runs-on : ubuntu-latest
18+
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
24+
25+ - name : Check Commit Message for '${{ inputs.screenshot-text }}'
26+ id : check_commit
27+ run : |
28+ COMMIT_MESSAGE=$(git log --format=%B -n 1 ${{ github.sha }})
29+ if [[ $COMMIT_MESSAGE == *"${{ inputs.screenshot-text }}"* ]]; then
30+ echo "Contains Screenshot: true"
31+ echo "contains_screenshot=true" >> $GITHUB_OUTPUT
32+ else
33+ echo "Contains Screenshot: false"
34+ echo "contains_screenshot=false" >> $GITHUB_OUTPUT
35+ fi
36+ shell : bash
37+
38+ outputs :
39+ contains_screenshot : ${{ steps.check_commit.outputs.contains_screenshot }}
You can’t perform that action at this time.
0 commit comments