File tree Expand file tree Collapse file tree 3 files changed +111
-12
lines changed
Expand file tree Collapse file tree 3 files changed +111
-12
lines changed Original file line number Diff line number Diff line change 77 workflow_dispatch :
88
99jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout
14+ uses : actions/checkout@v3
15+ with :
16+ fetch-depth : 0
17+ - name : Set up Go
18+ uses : actions/setup-go@v4
19+ with :
20+ go-version : " 1.23.1"
21+ - name : Run tests
22+ run : make test
23+
1024 dev :
1125 runs-on : ubuntu-latest
26+ needs : test
1227 steps :
1328 - name : Checkout code
1429 uses : actions/checkout@v3
3146 push : true
3247 file : " ./Dockerfile.dev"
3348 tags : raystack/frontier:dev
34- releaser :
49+
50+ # Fast release: Linux/amd64 binary + Docker image only
51+ # This finishes first so users don't have to wait
52+ release-fast :
53+ runs-on : ubuntu-latest
54+ needs : test
55+ steps :
56+ - name : Checkout
57+ uses : actions/checkout@v3
58+ with :
59+ fetch-depth : 0
60+ - name : Set up Go
61+ uses : actions/setup-go@v4
62+ with :
63+ go-version : " 1.23.1"
64+ - name : Login to DockerHub
65+ uses : docker/login-action@v1
66+ with :
67+ registry : docker.io
68+ username : ${{ secrets.DOCKERHUB_USERNAME }}
69+ password : ${{ secrets.DOCKERHUB_TOKEN }}
70+ - name : Run GoReleaser (fast - linux/amd64)
71+ uses : goreleaser/goreleaser-action@v4
72+ with :
73+ distribution : goreleaser
74+ version : " ~> v1"
75+ args : release --clean -f .goreleaser-fast.yml
76+ env :
77+ GITHUB_TOKEN : ${{ secrets.GO_RELEASER_TOKEN }}
78+
79+ # Full release: All other platforms, appends to the release created above
80+ release-full :
3581 runs-on : ubuntu-latest
82+ needs : release-fast
3683 steps :
3784 - name : Checkout
3885 uses : actions/checkout@v3
4895 registry : docker.io
4996 username : ${{ secrets.DOCKERHUB_USERNAME }}
5097 password : ${{ secrets.DOCKERHUB_TOKEN }}
51- - name : Run GoReleaser
98+ - name : Run GoReleaser (full - remaining platforms)
5299 uses : goreleaser/goreleaser-action@v4
53100 with :
54101 distribution : goreleaser
Original file line number Diff line number Diff line change 1+ project_name : frontier
2+
3+ release :
4+ prerelease : auto
5+
6+ before :
7+ hooks :
8+ - make ui
9+
10+ builds :
11+ - id : " frontier"
12+ goos :
13+ - linux
14+ goarch :
15+ - amd64
16+ binary : frontier
17+ main : ./main.go
18+ ldflags :
19+ - -s -w -X github.com/raystack/frontier/config.Version={{.Tag}}
20+ - -X github.com/raystack/frontier/config.BuildCommit={{.FullCommit}}
21+ - -X github.com/raystack/frontier/config.BuildDate={{.Date}}
22+ env :
23+ - CGO_ENABLED=0
24+
25+ archives :
26+ - id : " frontier-archive"
27+ format : tar.gz
28+ name_template : >-
29+ {{ .ProjectName }}_
30+ {{- title .Os }}_
31+ {{- if eq .Arch "amd64" }}x86_64
32+ {{- else if eq .Arch "386" }}i386
33+ {{- else }}{{ .Arch }}{{ end }}
34+ {{- if .Arm }}v{{ .Arm }}{{ end }}
35+
36+ checksum :
37+ name_template : " checksums-linux-amd64.txt"
38+
39+ snapshot :
40+ name_template : " {{ .Tag }}-next"
41+
42+ dockers :
43+ - goos : linux
44+ goarch : amd64
45+ ids :
46+ - frontier
47+ dockerfile : Dockerfile
48+ image_templates :
49+ - " docker.io/raystack/{{.ProjectName}}:latest"
50+ - " docker.io/raystack/{{.ProjectName}}:{{ .Tag }}"
51+ - " docker.io/raystack/{{.ProjectName}}:{{ .Tag }}-amd64"
52+
53+ # Skip changelog - full release will generate it
54+ changelog :
55+ disable : true
Original file line number Diff line number Diff line change @@ -2,10 +2,11 @@ project_name: frontier
22
33release :
44 prerelease : auto
5+ # Append to the release created by fast releaser
6+ mode : append
57
68before :
79 hooks :
8- - make test
910 - make ui
1011
1112builds :
@@ -17,6 +18,10 @@ builds:
1718 goarch :
1819 - amd64
1920 - arm64
21+ # Skip linux/amd64 - already built by fast releaser
22+ ignore :
23+ - goos : linux
24+ goarch : amd64
2025 binary : frontier
2126 main : ./main.go
2227 ldflags :
@@ -55,15 +60,7 @@ snapshot:
5560 name_template : " {{ .Tag }}-next"
5661
5762dockers :
58- - goos : linux
59- goarch : amd64
60- ids :
61- - frontier
62- dockerfile : Dockerfile
63- image_templates :
64- - " docker.io/raystack/{{.ProjectName}}:latest"
65- - " docker.io/raystack/{{.ProjectName}}:{{ .Tag }}"
66- - " docker.io/raystack/{{.ProjectName}}:{{ .Tag }}-amd64"
63+ # linux/amd64 Docker image is built by fast releaser
6764 - goos : linux
6865 goarch : arm64
6966 ids :
You can’t perform that action at this time.
0 commit comments