File tree Expand file tree Collapse file tree 3 files changed +70
-8
lines changed Expand file tree Collapse file tree 3 files changed +70
-8
lines changed Original file line number Diff line number Diff line change 1- # name: Release
1+ name : Release
22
33on :
44 push :
55 tags :
66 - ' v*'
77
8- jobs :
8+ permissions :
9+ contents : write
910
10- dummy :
11- name : Dummy
11+ jobs :
12+ build_and_release :
1213 runs-on : ubuntu-latest
13-
1414 steps :
15- - name : Dummy
16- run : exit 0
17-
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0
19+
20+ - name : Set up Go
21+ uses : actions/setup-go@v5
22+ with :
23+ go-version : ^v1.24
24+
25+ - name : Build
26+ run : make build
27+
28+ # https://goreleaser.com/cmd/goreleaser_release/
29+ - name : Run GoReleaser
30+ uses : goreleaser/goreleaser-action@v6
31+ with :
32+ distribution : goreleaser
33+ version : " ~> v2"
34+ args : release --config .goreleaser.yaml
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1837
1938# docker-image:
2039# name: Publish Docker Image
Original file line number Diff line number Diff line change 1+ version : 2
2+
3+ # https://goreleaser.com/customization/builds/go/
4+ builds :
5+ - id : go-template
6+ main : ./cmd/cli/
7+ binary : cli
8+
9+ env :
10+ # Force build to be all Go.
11+ - CGO_ENABLED=0
12+ flags :
13+ # Remove all file system paths from the executable.
14+ - -trimpath
15+ ldflags :
16+ # Sets the value of the symbol.
17+ - -X github.com/flashbots/go-template/common.Version={{.Version}}
18+ goos :
19+ - linux
20+ - darwin
21+ goarch :
22+ - amd64
23+ - arm64
24+ - riscv64
25+ ignore :
26+ - goos : darwin
27+ goarch : riscv64
28+
29+ # https://goreleaser.com/customization/release/
30+ release :
31+ draft : true
32+ extra_files :
33+ - glob : ./dist/*
34+ header : |
35+ # π Features
36+ # π Enhancements
37+ # π Notable bug fixes
38+ # π Version updates
39+ # π Community
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ build-httpserver: ## Build the HTTP server
3030 @mkdir -p ./build
3131 go build -trimpath -ldflags " -X github.com/flashbots/go-template/common.Version=${VERSION} " -v -o ./build/httpserver cmd/httpserver/main.go
3232
33+ .PHONY : build
34+ build : build-cli build-httpserver # # Build all binaries
35+ @echo " Binaries built in ./build/"
36+
3337# #@ Test & Development
3438
3539.PHONY : test
You canβt perform that action at this time.
0 commit comments