1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*' # Trigger on version tags like v1.0.0, v1.2.3, etc.
7
+ workflow_dispatch : # Allow manual triggering
8
+
9
+ jobs :
10
+ build :
11
+ name : Build All Platforms
12
+ runs-on : ubuntu-latest
13
+
14
+ steps :
15
+ - name : Check out code
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Set up Go
19
+ uses : actions/setup-go@v5
20
+ with :
21
+ go-version : ' 1.25'
22
+ check-latest : true
23
+
24
+ - name : Cache Go modules
25
+ uses : actions/cache@v4
26
+ with :
27
+ path : |
28
+ ~/.cache/go-build
29
+ ~/go/pkg/mod
30
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
31
+ restore-keys : |
32
+ ${{ runner.os }}-go-
33
+
34
+ - name : Download and verify dependencies
35
+ run : make deps
36
+
37
+ - name : Build all platforms
38
+ run : make build-all
39
+
40
+ - name : Upload Linux x64 binary
41
+ uses : actions/upload-artifact@v4
42
+ with :
43
+ name : boundary-linux-amd64
44
+ path : build/boundary-linux-amd64
45
+ retention-days : 7
46
+
47
+ - name : Upload Linux ARM64 binary
48
+ uses : actions/upload-artifact@v4
49
+ with :
50
+ name : boundary-linux-arm64
51
+ path : build/boundary-linux-arm64
52
+ retention-days : 7
53
+
54
+ - name : Upload macOS Intel binary
55
+ uses : actions/upload-artifact@v4
56
+ with :
57
+ name : boundary-darwin-amd64
58
+ path : build/boundary-darwin-amd64
59
+ retention-days : 7
60
+
61
+ - name : Upload macOS Apple Silicon binary
62
+ uses : actions/upload-artifact@v4
63
+ with :
64
+ name : boundary-darwin-arm64
65
+ path : build/boundary-darwin-arm64
66
+ retention-days : 7
67
+
68
+ release :
69
+ name : Create Release
70
+ needs : build
71
+ runs-on : ubuntu-latest
72
+ if : startsWith(github.ref, 'refs/tags/')
73
+
74
+ steps :
75
+ - name : Check out code
76
+ uses : actions/checkout@v4
77
+
78
+ - name : Set up Go
79
+ uses : actions/setup-go@v5
80
+ with :
81
+ go-version : ' 1.25'
82
+ check-latest : true
83
+
84
+ - name : Download all artifacts
85
+ uses : actions/download-artifact@v4
86
+ with :
87
+ path : ./binaries
88
+
89
+ - name : Prepare release assets
90
+ run : |
91
+ # Create archives directly from artifacts using make target
92
+ make release-archives
93
+
94
+ # List all release assets
95
+ ls -la archives/*.tar.gz
96
+
97
+ - name : Create GitHub Release
98
+ uses : softprops/action-gh-release@v2
99
+ with :
100
+ files : ' archives/*.tar.gz'
101
+ draft : false
102
+ prerelease : ${{ contains(github.ref_name, '-') }}
103
+ generate_release_notes : true
104
+ env :
105
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments