From 21213c696e4a6daa2aa721c63928496d199d247e Mon Sep 17 00:00:00 2001 From: grabowski Date: Wed, 22 Jul 2026 16:22:13 +0700 Subject: [PATCH] Publish the annotated tag message as the release body akkuman/gitea-release-action takes body/body_path but does not fall back to the tag annotation, so v1.2.0 published with empty notes. Write the tag body to a file and pass it; fetch-depth 0 so the annotated tag object is present to read it from. --- .gitea/workflows/build-pcm.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.gitea/workflows/build-pcm.yml b/.gitea/workflows/build-pcm.yml index 54708cb..9161ca3 100644 --- a/.gitea/workflows/build-pcm.yml +++ b/.gitea/workflows/build-pcm.yml @@ -13,6 +13,8 @@ jobs: # third-party actions pinned to commit SHAs: mutable tags could be # repointed at malicious code that runs with repo/token access - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + fetch-depth: 0 # the annotated tag carries the release notes - name: Check tag matches metadata.json version if: startsWith(github.ref, 'refs/tags/v') @@ -35,10 +37,20 @@ jobs: dist/*.zip dist/metadata-registry.json + # the action does not fall back to the tag annotation, so an + # un-bodied release publishes with empty notes (as v1.2.0 did) + - name: Release notes from the annotated tag + if: startsWith(github.ref, 'refs/tags/v') + run: | + git tag -l --format='%(contents:body)' "$GITHUB_REF_NAME" \ + > release-notes.md + cat release-notes.md + - name: Create release with the zip, registry metadata and figures if: startsWith(github.ref, 'refs/tags/v') uses: akkuman/gitea-release-action@b8d9144f302c68610911db1aaf722708d5c02d94 # v1 with: + body_path: release-notes.md files: | dist/*.zip dist/metadata-registry.json