Skip to content

Commit 1cf84bb

Browse files
committed
CI: add custom update messages when manually run
1 parent 05ff64f commit 1cf84bb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
required: true
1212
type: boolean
1313
default: false
14+
custom_notes:
15+
description: 'Custom updates to append to release notes'
16+
required: false
17+
type: string
1418
workflow_call:
1519

1620
jobs:
@@ -63,11 +67,24 @@ jobs:
6367
run: |
6468
COMMITS=$(git log ${{ steps.fetch-tag.outputs.tag }}..HEAD --pretty=format:"- %s (%h)" --abbrev-commit)
6569
echo "::set-output name=commits::${COMMITS}"
70+
- name: Prepare release notes
71+
id: release-notes
72+
run: |
73+
NOTES="${{ steps.get-commits.outputs.commits }}"
74+
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ github.event.inputs.custom_notes }}" != "" ]; then
75+
NOTES="${NOTES}
76+
77+
## Custom Updates
78+
${{ github.event.inputs.custom_notes }}"
79+
fi
80+
echo "notes<<EOF" >> $GITHUB_OUTPUT
81+
echo "$NOTES" >> $GITHUB_OUTPUT
82+
echo "EOF" >> $GITHUB_OUTPUT
6683
- name: Zip root-module directory
6784
run: sh ./build-magisk-module.sh
6885
- name: Delete release if exist then create release
6986
env:
7087
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7188
run: |
7289
gh release view "nightly" && gh release delete "nightly" -y --cleanup-tag
73-
gh release create "nightly" "./$APK_NAME" "./btl2capfix.zip" -p -t "Nightly Release" -n "${{ steps.get-commits.outputs.commits }}" --generate-notes
90+
gh release create "nightly" "./$APK_NAME" "./btl2capfix.zip" -p -t "Nightly Release" -n "${{ steps.release-notes.outputs.notes }}" --generate-notes

0 commit comments

Comments
 (0)