mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-02-10 19:52:24 +00:00
CI: update CI to better format custom update messages
This commit is contained in:
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@@ -12,7 +12,7 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
custom_notes:
|
custom_notes:
|
||||||
description: 'Custom updates to append to release notes'
|
description: 'Custom updates to add to What''s Changed section'
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
workflow_call:
|
workflow_call:
|
||||||
@@ -70,16 +70,24 @@ jobs:
|
|||||||
- name: Prepare release notes
|
- name: Prepare release notes
|
||||||
id: release-notes
|
id: release-notes
|
||||||
run: |
|
run: |
|
||||||
NOTES="${{ steps.get-commits.outputs.commits }}"
|
# Create a temporary file for release notes
|
||||||
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ "${{ github.event.inputs.custom_notes }}" != "" ]; then
|
NOTES_FILE=$(mktemp)
|
||||||
NOTES="${NOTES}
|
|
||||||
|
# Process custom notes if they exist
|
||||||
|
if [ "${{ github.event_name }}" == "workflow_dispatch" ] && [ -n "${{ github.event.inputs.custom_notes }}" ]; then
|
||||||
|
CUSTOM_NOTES="${{ github.event.inputs.custom_notes }}"
|
||||||
|
|
||||||
## Custom Updates
|
# Check if custom notes already have bullet points or GitHub-style formatting
|
||||||
${{ github.event.inputs.custom_notes }}"
|
if echo "$CUSTOM_NOTES" | grep -q "^\*\|^- \|http.*commit\|in #[0-9]\+"; then
|
||||||
|
# Already formatted, use as is
|
||||||
|
echo "$CUSTOM_NOTES" > "$NOTES_FILE"
|
||||||
|
else
|
||||||
|
# Add bullet point formatting
|
||||||
|
echo "- $CUSTOM_NOTES" > "$NOTES_FILE"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "notes<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
echo "$NOTES" >> $GITHUB_OUTPUT
|
echo "notes_file=$NOTES_FILE" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
- name: Zip root-module directory
|
- name: Zip root-module directory
|
||||||
run: sh ./build-magisk-module.sh
|
run: sh ./build-magisk-module.sh
|
||||||
- name: Delete release if exist then create release
|
- name: Delete release if exist then create release
|
||||||
@@ -87,4 +95,4 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
gh release view "nightly" && gh release delete "nightly" -y --cleanup-tag
|
gh release view "nightly" && gh release delete "nightly" -y --cleanup-tag
|
||||||
gh release create "nightly" "./$APK_NAME" "./btl2capfix.zip" -p -t "Nightly Release" -n "${{ steps.release-notes.outputs.notes }}" --generate-notes
|
gh release create "nightly" "./$APK_NAME" "./btl2capfix.zip" -p -t "Nightly Release" --notes-file "${{ steps.release-notes.outputs.notes_file }}" --generate-notes
|
||||||
|
|||||||
Reference in New Issue
Block a user