mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-16 15:40:12 +01:00
fix: use versioned release notes in GitHub release workflow
This commit is contained in:
parent
3228b92581
commit
32638b9ec3
1 changed files with 6 additions and 1 deletions
7
.github/workflows/github-release.yml
vendored
7
.github/workflows/github-release.yml
vendored
|
|
@ -62,8 +62,13 @@ jobs:
|
|||
run: |
|
||||
VERSION_REF="${GITHUB_REF##*/}" # e.g. v1.2.3
|
||||
VERSION_NO_V="${VERSION_REF#v}"
|
||||
VERSIONED_NOTES="docs/releases/${VERSION_REF}.md"
|
||||
TEMPLATE="RELEASE_NOTES_TEMPLATE.md"
|
||||
if [ -f "$TEMPLATE" ]; then
|
||||
|
||||
# Prefer versioned release notes file if it exists
|
||||
if [ -f "$VERSIONED_NOTES" ]; then
|
||||
cp "$VERSIONED_NOTES" RELEASE_NOTES.md
|
||||
elif [ -f "$TEMPLATE" ]; then
|
||||
sed "s/\${VERSION}/${VERSION_REF}/g" "$TEMPLATE" > RELEASE_NOTES.md
|
||||
else
|
||||
echo "# MTG Python Deckbuilder ${VERSION_REF}" > RELEASE_NOTES.md
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue