Files
jellyfin-plugin-lyrics/.github/workflows/release-notes.yaml
Felitendo 07550ba4a6 fix: pass changelog body via env+notes-file in release-notes workflow
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.
2026-05-08 11:55:26 +02:00

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"