File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change 1- name : publish-package
1+ name : publish-package
22on :
33 push :
44 branches :
77 - ' test/**'
88
99 # Publish `v1.2.3` tags as releases.
10- tags :
11- - v*
10+
1211
1312env :
1413 " PipelineEnvironment " : true
6059 dotnet nuget push ./*.nupkg \
6160 --source "github" \
6261 --api-key ${{ secrets.GH_TOKEN }}
62+
63+ - name : Create GitHub Release
64+ run : |
65+ changelog=$(git log -20 --pretty=format:"- %s")
66+ tag_name="v$BUILD_VERSION"
67+
68+ json_payload=$(
69+ jq -n \
70+ --arg tag_name "$tag_name" \
71+ --arg name "$tag_name" \
72+ --arg body "$changelog" \
73+ '{
74+ tag_name: $tag_name,
75+ name: $name,
76+ body: $body,
77+ draft: false,
78+ prerelease: false
79+ }'
80+ )
81+
82+ curl -s -X POST \
83+ -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \
84+ -H "Accept: application/vnd.github+json" \
85+ https://api.github.com/repos/${{ github.repository }}/releases \
86+ -d "$json_payload"
You can’t perform that action at this time.
0 commit comments