ci: use tag message as release notes body
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Extracts annotated tag message via git tag --format and passes it as body_path to action-gh-release. Fetch-depth: 0 ensures tag data is available in checkout.
This commit is contained in:
9
.github/workflows/release.yml
vendored
9
.github/workflows/release.yml
vendored
@@ -13,6 +13,8 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Create tarball
|
- name: Create tarball
|
||||||
run: |
|
run: |
|
||||||
@@ -22,10 +24,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git archive --format=zip --prefix=passepartout-$(git describe --tags) HEAD -o passepartout.zip
|
git archive --format=zip --prefix=passepartout-$(git describe --tags) HEAD -o passepartout.zip
|
||||||
|
|
||||||
|
- name: Extract tag message as release notes
|
||||||
|
run: |
|
||||||
|
git tag -l --format='%(contents)' ${GITHUB_REF#refs/tags/} > /tmp/release-notes.md
|
||||||
|
echo "--- Notes preview ---"
|
||||||
|
head -20 /tmp/release-notes.md
|
||||||
|
|
||||||
- name: Upload to GitHub Release
|
- name: Upload to GitHub Release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
passepartout.tar.gz
|
passepartout.tar.gz
|
||||||
passepartout.zip
|
passepartout.zip
|
||||||
|
body_path: /tmp/release-notes.md
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
Reference in New Issue
Block a user