Skip to content

Commit 02b285a

Browse files
committed
Extract GitHub Release message from Git tag
1 parent 4d7c5b8 commit 02b285a

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,24 @@ jobs:
3434
path: '*/build/test-results/test/TEST-*.xml'
3535

3636
# Release
37+
- name: Get tag message
38+
if: github.ref_type == 'tag'
39+
id: tag_message
40+
run: |
41+
{
42+
echo "message<<EOF"
43+
git fetch -f origin tag ${{github.ref_name}}
44+
git tag -l ${{github.ref_name}} --format="%(contents)"
45+
echo "EOF"
46+
} >> "$GITHUB_OUTPUT"
3747
- name: Create GitHub Release
3848
if: github.ref_type == 'tag'
39-
uses: softprops/action-gh-release@v1
49+
uses: softprops/action-gh-release@v2
50+
with:
51+
body: |
52+
**[Maven package](https://mvnrepository.com/artifact/typedrest.net/typedrest/${{steps.gitversion.outputs.semVer}})**
53+
## Changes
54+
${{steps.tag_message.outputs.message}}
4055
4156
# Publish
4257
- name: Publish packages (GitHub)

0 commit comments

Comments
 (0)