File tree 1 file changed +45
-0
lines changed
1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Release
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ tags :
8
+ - ' v*.*.*'
9
+
10
+ jobs :
11
+ build :
12
+ if : github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
18
+
19
+ - name : Set up Node.js
20
+ uses : actions/setup-node@v2
21
+ with :
22
+ node-version : ' 14.15'
23
+
24
+ - name : Run grunt
25
+ run : npx grunt
26
+
27
+ - name : Zip files
28
+ run : zip -r release.zip .
29
+
30
+ - name : Create GitHub Release
31
+ id : create_release
32
+ uses : actions/create-release@v1
33
+ env :
34
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
+ with :
36
+ tag_name : ${{ github.ref }}
37
+ release_name : Release ${{ github.ref }}
38
+ draft : false
39
+ prerelease : false
40
+
41
+ - name : Upload Release
42
+
43
+ with :
44
+ artifacts : " release.zip"
45
+ token : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments