File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed
Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release
2+
3+ on :
4+ push :
5+ tags :
6+ - " *" # trigger on any tag push
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ build :
13+ name : Build binaries
14+ runs-on : ubuntu-latest
15+
16+ strategy :
17+ matrix :
18+ arch : [amd64, arm64]
19+
20+ steps :
21+ - name : Checkout code
22+ uses : actions/checkout@v4
23+
24+ - name : Set up Go
25+ uses : actions/setup-go@v5
26+ with :
27+ go-version : " 1.26" # change if needed
28+
29+ - name : Build binary
30+ run : |
31+ mkdir -p dist
32+ GOOS=linux GOARCH=${{ matrix.arch }} go build -o dist/managedssh-linux-${{ matrix.arch }}
33+
34+ - name : Upload build artifact
35+ uses : actions/upload-artifact@v4
36+ with :
37+ name : managedssh-${{ matrix.arch }}
38+ path : dist/managedssh-linux-${{ matrix.arch }}
39+
40+ release :
41+ name : Create Release
42+ runs-on : ubuntu-latest
43+ needs : build
44+
45+ steps :
46+ - name : Download all artifacts
47+ uses : actions/download-artifact@v4
48+ with :
49+ path : dist
50+
51+ - name : Display files (debug)
52+ run : ls -R dist
53+
54+ - name : Create GitHub Release
55+ uses : softprops/action-gh-release@v2
56+ with :
57+ files : |
58+ dist/**/*
59+ env :
60+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments