File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ permissions :
4+ contents : write
5+
6+ on :
7+ workflow_dispatch :
8+
9+ jobs :
10+ publish :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Read version info
17+ run : |
18+ echo "GO_VERSION=$(cat go.version)" >> $GITHUB_ENV
19+ echo "ESBUILD_VERSION=$(cat version.txt)" >> $GITHUB_ENV
20+
21+ - name : Extract the release notes
22+ run : |
23+ CHANGELOG=$(awk -v "ver=$ESBUILD_VERSION" '/^## / { if (p) { exit }; if ($2 == ver) { p=1; next} } p' CHANGELOG.md)
24+ echo "CHANGELOG<<EOF" >> $GITHUB_ENV
25+ echo "$CHANGELOG" >> $GITHUB_ENV
26+ echo "EOF" >> $GITHUB_ENV
27+
28+ # Make sure we'll be able to generate release notes later on below
29+ - name : Release notes must not be empty
30+ run : |
31+ test -n "$CHANGELOG"
32+
33+ # Only do this after publishing was successful
34+ - name : Create a GitHub Release
35+ uses : actions/create-release@v1
36+ env :
37+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ with :
39+ tag_name : v${{ env.ESBUILD_VERSION }}
40+ release_name : v${{ env.ESBUILD_VERSION }}
41+ body : ${{ env.CHANGELOG }}
42+ draft : false
43+ prerelease : false
You can’t perform that action at this time.
0 commit comments