Skip to content

Commit 8311246

Browse files
committed
Update CI to generate release notes from tag
1 parent 2b9d051 commit 8311246

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,28 @@ jobs:
5050
with:
5151
name: binaries
5252

53+
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0
56+
57+
- name: Extract release notes from tag
58+
id: notes
59+
run: |
60+
# Get the annotated tag message (or commit message for lightweight tags)
61+
NOTES=$(git tag -l --format='%(contents)' "${GITHUB_REF_NAME}")
62+
if [ -z "$NOTES" ]; then
63+
NOTES=$(git log -1 --format='%B' "${GITHUB_REF_NAME}")
64+
fi
65+
{
66+
echo 'RELEASE_NOTES<<EOF'
67+
echo "$NOTES"
68+
echo 'EOF'
69+
} >> "$GITHUB_OUTPUT"
70+
5371
- name: Create GitHub Release
5472
uses: softprops/action-gh-release@v2
5573
with:
74+
body: ${{ steps.notes.outputs.RELEASE_NOTES }}
5675
files: |
5776
doubletake
5877
doubletake-ctl

0 commit comments

Comments
 (0)