File tree Expand file tree Collapse file tree 2 files changed +71
-1
lines changed Expand file tree Collapse file tree 2 files changed +71
-1
lines changed Original file line number Diff line number Diff line change 10
10
- docker
11
11
stages :
12
12
- name : go deps
13
- script : go mod tidy
13
+ script : go mod tidy
14
+
15
+ v1.0.* :
16
+ tag_push :
17
+ - docker :
18
+ build : .ide/Dockerfile
19
+ stages :
20
+ - name : changelog
21
+ image : cnbcool/changelog
22
+ exports :
23
+ latestChangeLog : LATEST_CHANGE_LOG
24
+ - name : create release
25
+ type : git:release
26
+ options :
27
+ title : release
28
+ description : ${LATEST_CHANGE_LOG}
29
+ - name : build
30
+ script :
31
+ - chmod +x build.sh
32
+ - ./build.sh
33
+ - name : release 上传附件
34
+ image : cnbcool/attachments:latest
35
+ settings :
36
+ attachments :
37
+ - build/*.exe
38
+ - build/mcp-alapi-cn-*-linux-*
39
+ - build/mcp-alapi-cn-*-darwin-*
Original file line number Diff line number Diff line change
1
+ name : Release Build and Upload
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*' # 匹配以 v 开头的 tag,例如 v1.0.0
7
+
8
+ jobs :
9
+ build-and-release :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v4
15
+ with :
16
+ fetch-depth : 0
17
+
18
+ - name : Set up Go
19
+ uses : actions/setup-go@v4
20
+ with :
21
+ go-version : ' 1.24.1'
22
+ cache : true
23
+
24
+ - name : Make build.sh executable
25
+ run : chmod +x build.sh
26
+
27
+ - name : Build
28
+ run : ./build.sh
29
+ env :
30
+ GO111MODULE : on
31
+
32
+ - name : Create Release
33
+ id : create_release
34
+ uses : softprops/action-gh-release@v2
35
+ with :
36
+ files : |
37
+ build/*.exe
38
+ build/mcp-alapi-cn-*-linux-*
39
+ build/mcp-alapi-cn-*-darwin-*
40
+ generate_release_notes : true
41
+ draft : false
42
+ prerelease : false
43
+ env :
44
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments