mirror of
https://github.com/Felitendo/jellyfin-plugin-lyrics.git
synced 2026-11-01 09:13:26 +01:00
The previous workflow inlined ${{ steps.changelog.outputs.body }} directly
into the gh release edit command. Backticks in the changelog (e.g.
`jellyfin-plugin-lrclib` in v1.6.2) were evaluated as command substitution
by the shell, breaking every release-notes run since v1.6.
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
name: '📋 Update Release Notes'
|
|
|
|
on:
|
|
release:
|
|
types:
|
|
- released
|
|
- edited
|
|
|
|
jobs:
|
|
update-notes:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
with:
|
|
ref: master
|
|
|
|
- name: Extract changelog from build.yaml
|
|
id: changelog
|
|
run: |
|
|
changelog=$(sed -n '/^changelog: |-$/,/^[^ ]/{ /^changelog: |-$/d; /^[^ ]/d; s/^ //; p; }' build.yaml)
|
|
echo "body<<EOF" >> "$GITHUB_OUTPUT"
|
|
echo "$changelog" >> "$GITHUB_OUTPUT"
|
|
echo "EOF" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Update release body
|
|
if: steps.changelog.outputs.body != ''
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAG_NAME: ${{ github.event.release.tag_name }}
|
|
BODY: ${{ steps.changelog.outputs.body }}
|
|
run: |
|
|
printf '%s' "$BODY" > "$RUNNER_TEMP/release-notes.md"
|
|
gh release edit "$TAG_NAME" --notes-file "$RUNNER_TEMP/release-notes.md"
|