File tree Expand file tree Collapse file tree 8 files changed +70
-0
lines changed Expand file tree Collapse file tree 8 files changed +70
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : publish
2
+ on :
3
+ push :
4
+ tags :
5
+ - ' *'
6
+ jobs :
7
+ publish :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@master
11
+ with :
12
+ fetch-depth : 1
13
+ - name : Set up Go
14
+ uses : actions/setup-go@v2
15
+ with :
16
+ go-version : 1.22.5
17
+ - name : Make all
18
+ run : make all
19
+ - name : Upload release binaries
20
+ uses : actions/upload-artifact@v2
21
+ with :
22
+ name : release-binaries
23
+ path : ./bin/
24
+ - name : Create Release
25
+ id : create_release
26
+ uses : actions/create-release@v1
27
+ env :
28
+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
29
+ with :
30
+ tag_name : ${{ github.ref }}
31
+ release_name : Release ${{ github.ref }}
32
+ draft : false
33
+ prerelease : false
34
+ - name : Upload Release Asset
35
+ uses : actions/upload-release-asset@v1
36
+ env :
37
+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
38
+ with :
39
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
40
+ asset_path : ./bin/
41
+ asset_name : release-it
42
+ asset_content_type : application/zip
Original file line number Diff line number Diff line change
1
+ Version := $(shell git describe --tags --dirty)
2
+ GitCommit := $(shell git rev-parse HEAD)
3
+ LDFLAGS := "-s -w -X main.Version=$(Version ) -X main.GitCommit=$(GitCommit ) "
4
+
5
+ .PHONY : all
6
+ all : gofmt vendor dist
7
+
8
+ .PHONY : gofmt
9
+ gofmt :
10
+ @test -z $(shell gofmt -l ./ | tee /dev/stderr) || (echo " [WARN] Fix formatting issues with 'make fmt'" && exit 1)
11
+
12
+ .PHONY : vendor
13
+ vendor :
14
+ go mod vendor
15
+
16
+ .PHONY : dist
17
+ dist :
18
+ mkdir -p bin/
19
+ CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/release-it-amd64
20
+ CGO_ENABLED=0 GOOS=darwin go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/release-it-darwin
21
+ GOARM=7 GOARCH=arm CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/release-it-arm
22
+ GOARCH=arm64 CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/release-it-arm64
23
+ GOOS=windows CGO_ENABLED=0 go build -mod=vendor -a -ldflags $(LDFLAGS ) -installsuffix cgo -o bin/release-it.exe
24
+
25
+ test :
26
+ go test ./... -v -race
Original file line number Diff line number Diff line change
1
+ # github.com/a-h/templ v0.2.747
2
+ ## explicit; go 1.21
You can’t perform that action at this time.
0 commit comments