File tree 1 file changed +27
-3
lines changed 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
2
2
on :
3
3
push :
4
4
branches :
7
7
- ' test/**'
8
8
9
9
# Publish `v1.2.3` tags as releases.
10
- tags :
11
- - v*
10
+
12
11
13
12
env :
14
13
" PipelineEnvironment " : true
@@ -100,3 +99,28 @@ jobs:
100
99
101
100
- name : Deploy to GitHub Pages
102
101
uses : actions/deploy-pages@v4
102
+
103
+ - name : Create GitHub Release
104
+ run : |
105
+ changelog=$(git log -20 --pretty=format:"- %s")
106
+ tag_name="v$BUILD_VERSION"
107
+
108
+ json_payload=$(
109
+ jq -n \
110
+ --arg tag_name "$tag_name" \
111
+ --arg name "$tag_name" \
112
+ --arg body "$changelog" \
113
+ '{
114
+ tag_name: $tag_name,
115
+ name: $name,
116
+ body: $body,
117
+ draft: false,
118
+ prerelease: false
119
+ }'
120
+ )
121
+
122
+ curl -s -X POST \
123
+ -H "Authorization: Bearer ${{ secrets.GH_TOKEN }}" \
124
+ -H "Accept: application/vnd.github+json" \
125
+ https://api.github.com/repos/${{ github.repository }}/releases \
126
+ -d "$json_payload"
You can’t perform that action at this time.
0 commit comments