File tree Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Expand file tree Collapse file tree 2 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*.*.*'
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ - uses : actions/setup-go@v5
14
+ with :
15
+ go-version-file : go.mod
16
+ - name : Cross building
17
+ run : |
18
+ PREFIX=.build/tcp-over-bt
19
+
20
+ # args: OS ARCH HOST/DEVICE
21
+ _build() { GOOS=$1 GOARCH=$2 go build -o $PREFIX-$1-$2-$3; }
22
+
23
+ _build linux arm64 device &
24
+ _build darwin arm64 host &
25
+
26
+ wait
27
+ - name : Generate body
28
+ run : |
29
+ echo '**Build At**:
30
+
31
+ * `'"$(date)"'`
32
+ * `'"$(TZ=Asia/Shanghai date)"'`
33
+
34
+ **sha256sum**:
35
+
36
+ ```-
37
+ '"$(cd .build && sha256sum *)"'
38
+ ```
39
+ ' > .build/body.md
40
+ - name : Create Release
41
+
42
+ with :
43
+ allowUpdates : true
44
+ artifactErrorsFailBuild : true
45
+ replacesArtifacts : true
46
+ artifacts : .build/*
47
+ tag : release-main-latest
48
+ bodyFile : .build/body.md
Original file line number Diff line number Diff line change 1
1
/tcp-over-bt
2
+ /.build /
You can’t perform that action at this time.
0 commit comments