File tree Expand file tree Collapse file tree 5 files changed +53
-33
lines changed
Expand file tree Collapse file tree 5 files changed +53
-33
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+ goreleaser :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : check out code
16+ uses : actions/checkout@v6
17+ with :
18+ fetch-depth : 0
19+
20+ - name : set up go
21+ uses : actions/setup-go@v6
22+ with :
23+ go-version : " 1.25"
24+
25+ - name : run goreleaser
26+ uses : goreleaser/goreleaser-action@v6
27+ with :
28+ version : ~> 2
29+ args : release --clean
30+ env :
31+ GITHUB_TOKEN : ${{ secrets.GORELEASER_GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1616
1717var /
1818dist /
19+ .bin /
1920docker-compose-private.yml
2021.vscode
2122.idea
Original file line number Diff line number Diff line change 1+ version : 2
2+ project_name : updater
3+ dist : .bin
14builds :
2- - env :
5+ - id : updater
6+ binary : " updater"
7+ env :
38 - CGO_ENABLED=0
49 goos :
510 - linux
@@ -10,15 +15,24 @@ builds:
1015 - arm
1116 - arm64
1217 ignore :
13- - goos : freebsd
18+ - goos : windows
1419 goarch : arm
15- - goos : freebsd
20+ - goos : windows
1621 goarch : arm64
1722 dir : app
1823 ldflags : " -s -w -X main.revision={{.Tag}}-{{.ShortCommit}}-{{.CommitDate}}"
1924
2025archives :
21- - name_template : " {{ .ProjectName }}_{{ .Tag }}_{{ if eq .Os \" darwin\" }}macos{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}"
26+ - id : updater
27+ name_template : >-
28+ {{.ProjectName}}_
29+ {{- .Tag}}_
30+ {{- if eq .Os "darwin"}}macos
31+ {{- else if eq .Os "windows"}}win
32+ {{- else}}{{.Os}}{{end}}_
33+ {{- if eq .Arch "amd64"}}x86_64
34+ {{- else if eq .Arch "386"}}i386
35+ {{- else}}{{.Arch}}{{end}}
2236 format_overrides :
2337 - goos : windows
2438 format : zip
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,18 +7,13 @@ docker:
77 docker build -t umputun/updater:master --progress=plain .
88
99dist :
10- - @mkdir -p dist
11- docker build -f Dockerfile.artifacts --progress=plain -t updater.bin .
12- - @docker rm -f updater.bin 2> /dev/null || exit 0
13- docker run -d --name=updater.bin updater.bin
14- docker cp updater.bin:/artifacts dist/
15- docker rm -f updater.bin
10+ goreleaser --snapshot --clean
1611
1712race_test :
1813 cd app && go test -race -timeout=60s -count 1 ./...
1914
2015build : info
21- - cd app && GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags " -X main.revision=$( REV) -s -w" -o ../dist /updater
16+ cd app && CGO_ENABLED=0 go build -ldflags " -X main.revision=$( REV) -s -w" -o /tmp /updater
2217
2318site :
2419 @rm -f site/public/*
3025info :
3126 - @echo " revision $( REV) "
3227
33- .PHONY : dist docker race_test bin info site build_site
28+ .PHONY : dist docker race_test build info site
You can’t perform that action at this time.
0 commit comments