File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
Expand file tree Collapse file tree 1 file changed +53
-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+ permissions :
9+ contents : write
10+
11+ jobs :
12+ release :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v4
16+
17+ - name : Set up Go
18+ uses : actions/setup-go@v5
19+ with :
20+ go-version : ' 1.24'
21+
22+ - name : Download dependencies
23+ run : go mod download
24+
25+ # - name: Run tests
26+ # run: go test -v ./...
27+
28+ - name : Create build directory
29+ run : mkdir -p build
30+
31+ - name : Build for ARM Linux
32+ run : |
33+ GOARCH=arm GOOS=linux go build -ldflags="-s -w" -o build/modbus-serial2tcp-arm-linux .
34+ chmod +x build/modbus-serial2tcp-arm-linux
35+
36+ - name : Build for ARM64 Linux
37+ run : |
38+ GOARCH=arm64 GOOS=linux go build -ldflags="-s -w" -o build/modbus-serial2tcp-arm64-linux .
39+ chmod +x build/modbus-serial2tcp-arm64-linux
40+
41+ - name : Build for AMD64 Linux
42+ run : |
43+ GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o build/modbus-serial2tcp-amd64-linux .
44+ chmod +x build/modbus-serial2tcp-amd64-linux
45+
46+ - name : Create Release
47+ uses : softprops/action-gh-release@v1
48+ with :
49+ files : |
50+ build/modbus-serial2tcp-arm-linux
51+ build/modbus-serial2tcp-arm64-linux
52+ build/modbus-serial2tcp-amd64-linux
53+ modbus-s2t.service
You can’t perform that action at this time.
0 commit comments