1
- # This is a basic workflow to help you get started with Actions
2
-
3
- name : Build And Release
4
-
5
- # Controls when the action will run. Triggers the workflow on push or pull request
6
- # events but only for the master branch
7
1
on :
8
2
push :
3
+ # Sequence of patterns matched against refs/tags
9
4
tags :
10
5
- ' v*' # Push events to matching v*, i.e. v1.0, v20.15.10
11
6
12
- # A workflow run is made up of one or more jobs that can run sequentially or in parallel
7
+ name : Create Release And Upload assets
8
+
13
9
jobs :
14
- # This workflow contains a single job called "build"
15
- create_release :
10
+ create-release :
16
11
name : Create Release
17
12
runs-on : ubuntu-latest
13
+ strategy :
14
+ matrix :
15
+ go_version : [ 'stable' ]
18
16
outputs :
19
17
upload_url : ${{ steps.create_release.outputs.upload_url }}
20
18
steps :
19
+ - uses : actions/checkout@v4
20
+
21
+ - uses : actions/cache@v4
22
+ with :
23
+ path : |
24
+ ~/.npm
25
+ ~/.cache
26
+ ~/go/pkg/mod
27
+ key : ${{ runner.os }}-build-${{ github.sha }}
28
+ restore-keys : ${{ runner.os }}-build-
29
+
30
+ - name : Get version
31
+ id : get_version
32
+ run : |
33
+ TAG=$(basename ${GITHUB_REF})
34
+ echo "TAG=$TAG" >> $GITHUB_OUTPUT
35
+
21
36
- name : Create Release
22
37
id : create_release
23
- uses : actions/create- release@v1
38
+ uses : release-drafter/ release-drafter@v6
24
39
env :
25
40
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26
41
with :
27
- tag_name : ${{ github.ref }}
28
- release_name : ${{ github.ref }}
29
- draft : true
30
- prerelease : false
42
+ config-name : release-config.yml
43
+ version : ${{ steps.get_version.outputs.TAG }}
44
+ tag : ${{ steps.get_version.outputs.TAG }}
31
45
32
- build :
33
- name : Build
34
- needs : create_release
35
- strategy :
36
- matrix :
37
- go-version : [ 1.23.x ]
38
- os : [ ubuntu-latest, macos-latest, windows-latest ]
39
- runs-on : ${{ matrix.os }}
40
-
41
- # Steps represent a sequence of tasks that will be executed as part of the job
42
- steps :
43
- - name : Install Go
44
- uses : actions/setup-go@v2
46
+ - uses : actions/setup-node@v4
45
47
with :
46
- go-version : ${{ matrix.go-version }}
47
- - name : Checkout code
48
- uses : actions/checkout@v2
48
+ node-version : ${{ matrix.node_version }}
49
49
50
- - name : Build JMS Tool
51
- id : build_jms_tool
52
- uses : ./.github/actions/build-action
50
+ - uses : actions/setup-go@v5
53
51
with :
54
- GOOS : ${{ matrix.os }}
52
+ go-version : ${{ matrix.go_version }}
53
+ cache : false
55
54
56
- - name : Upload Release Asset
57
- id : upload-release-asset
58
- uses : actions/upload-release-asset@v1
55
+ - name : Make Build
56
+ id : make_build
57
+ run : |
58
+ make all -s && ls build
59
59
env :
60
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
60
+ VERSION : ${{ steps.get_version.outputs.TAG }}
61
+
62
+ - name : Release Upload Assets
63
+ uses : softprops/action-gh-release@v2
64
+ if : startsWith(github.ref, 'refs/tags/')
61
65
with :
62
- upload_url : ${{ needs.create_release.outputs.upload_url }}
63
- asset_path : ./${{ steps.build_jms_tool.outputs.filename }}
64
- asset_name : ${{ steps.build_jms_tool.outputs.filename }}
65
- asset_content_type : application/gzip
66
+ draft : true
67
+ files : |
68
+ build/*.gz
69
+ env :
70
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments