Skip to content

Commit be3a0dd

Browse files
author
Jake Soenneker
committed
Releases added to action
1 parent ea29577 commit be3a0dd

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.github/workflows/publish-package.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
branches:
55
- main
66

7-
tags:
8-
- v*
97
paths-ignore:
108
- 'test/**'
119

@@ -94,3 +92,28 @@ jobs:
9492
dotnet nuget push ./*.nupkg \
9593
--source "github" \
9694
--api-key ${{ secrets.GH_TOKEN }}
95+
96+
- name: Create GitHub Release
97+
run: |
98+
changelog=$(git log -20 --pretty=format:"- %s")
99+
tag_name="v$BUILD_VERSION"
100+
101+
json_payload=$(
102+
jq -n \
103+
--arg tag_name "$tag_name" \
104+
--arg name "$tag_name" \
105+
--arg body "$changelog" \
106+
'{
107+
tag_name: $tag_name,
108+
name: $name,
109+
body: $body,
110+
draft: false,
111+
prerelease: false
112+
}'
113+
)
114+
115+
curl -s -X POST \
116+
-H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \
117+
-H "Accept: application/vnd.github+json" \
118+
https://api.github.com/repos/${{ github.repository }}/releases \
119+
-d "$json_payload"

0 commit comments

Comments
 (0)