File tree 1 file changed +26
-3
lines changed 1 file changed +26
-3
lines changed Original file line number Diff line number Diff line change 1
- name : publish-package
1
+ name : publish-package
2
2
on :
3
3
push :
4
4
branches :
5
5
- main
6
6
paths-ignore :
7
7
- ' test/**'
8
8
9
- tags :
10
- - v*
11
9
12
10
env :
13
11
" PipelineEnvironment " : true
94
92
dotnet nuget push ./*.nupkg \
95
93
--source "github" \
96
94
--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"
You can’t perform that action at this time.
0 commit comments