File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Prepare Release
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ tags :
7
+ - ' v*'
8
+
9
+ env :
10
+ CI : true
11
+
12
+ permissions :
13
+ contents : read
14
+
15
+ jobs :
16
+ build :
17
+ permissions :
18
+ contents : write # for softprops/action-gh-release to create GitHub release
19
+
20
+ runs-on : ubuntu-latest
21
+
22
+ strategy :
23
+ matrix :
24
+ node-version : [18]
25
+
26
+ steps :
27
+ - uses : actions/checkout@v3
28
+
29
+ - run : git fetch --tags -f
30
+
31
+ - name : Resolve version
32
+ id : vars
33
+ run : |
34
+ echo "TAG_NAME=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
35
+
36
+ - name : Get release notes
37
+ run : |
38
+ RELEASE_NOTES=$(npm run release-notes --silent)
39
+ echo "RELEASE_NOTES<<EOF" >> $GITHUB_ENV
40
+ echo "$RELEASE_NOTES" >> $GITHUB_ENV
41
+ echo "EOF" >> $GITHUB_ENV
42
+
43
+ - name : Use Node.js ${{ matrix.node-version }}
44
+ uses : actions/setup-node@v3
45
+ with :
46
+ node-version : ${{ matrix.node-version }}
47
+ registry-url : ' https://registry.npmjs.org'
48
+
49
+ - name : Release
50
+ uses : softprops/action-gh-release@v1
51
+ with :
52
+ draft : true
53
+ tag_name : ${{ env.TAG_NAME }}
54
+ body : |
55
+ ${{ env.RELEASE_NOTES }}
You can’t perform that action at this time.
0 commit comments