Skip to content

Commit 5519c33

Browse files
🚀 automatically release cyctl using goreleaser (cyclops-ui#308)
* feat: automatically release cyctl using goreleaser Signed-off-by: Ruihua Wen <[email protected]> * fix: set the prerelease value to auto Signed-off-by: Ruihua Wen <[email protected]> * refactor: include the version in the file name Signed-off-by: Ruihua Wen <[email protected]> --------- Signed-off-by: Ruihua Wen <[email protected]>
1 parent e0d9ab5 commit 5519c33

File tree

3 files changed

+100
-0
lines changed

3 files changed

+100
-0
lines changed

.github/workflows/ci.yml

+16
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,19 @@ jobs:
131131
--target ${{ steps.extract_branch.outputs.branch }}\
132132
--prerelease
133133
fi
134+
135+
- name: Checkout
136+
uses: actions/checkout@v4
137+
with:
138+
fetch-depth: 0
139+
- name: Set up Go
140+
uses: actions/setup-go@v4
141+
- name: Run GoReleaser
142+
uses: goreleaser/goreleaser-action@v5
143+
with:
144+
distribution: goreleaser
145+
version: '~> v1'
146+
args: release --clean
147+
workdir: ./cyctl
148+
env:
149+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
.idea
22
.DS_Store
3+
4+
dist/

cyctl/.goreleaser.yaml

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
version: 1
2+
3+
env:
4+
- CGO_ENABLED=0
5+
6+
builds:
7+
- id: linux
8+
binary: cyctl
9+
goos:
10+
- linux
11+
- freebsd
12+
goarch:
13+
- amd64
14+
- arm64
15+
- arm
16+
- ppc64le
17+
- s390x
18+
goarm:
19+
- 7
20+
flags:
21+
- -trimpath
22+
ldflags:
23+
- -s -w -X github.com/cyclops-ui/cyclops/common.CliVersion={{.Version}}
24+
25+
- id: osx
26+
binary: cyctl
27+
goos:
28+
- darwin
29+
goarch:
30+
- amd64
31+
- arm64
32+
flags:
33+
- -trimpath
34+
ldflags:
35+
- -s -w -X github.com/cyclops-ui/cyclops/common.CliVersion={{.Version}}
36+
37+
- id: windows
38+
binary: cyctl
39+
goos:
40+
- windows
41+
goarch:
42+
- amd64
43+
- arm64
44+
flags:
45+
- -trimpath
46+
ldflags:
47+
- -s -w -X github.com/cyclops-ui/cyclops/common.CliVersion={{.Version}}
48+
49+
archives:
50+
- format: tar.gz
51+
name_template: "cyctl_{{ .Os }}_{{ .Arch }}_v{{.Version}}"
52+
format_overrides:
53+
- goos: windows
54+
format: zip
55+
56+
checksum:
57+
name_template: "cyctl_checksums.sha256"
58+
59+
nfpms:
60+
- file_name_template: 'cyctl_{{ .Os }}_{{ .Arch }}_v{{.Version}}'
61+
maintainer: Petar Cvitanović
62+
homepage: https://cyclops-ui.com/
63+
description: customizable UI for Kubernetes workloads.
64+
license: "Apache-2.0"
65+
formats:
66+
- deb
67+
- rpm
68+
- apk
69+
bindir: /usr/bin
70+
section: utils
71+
contents:
72+
- src: ../LICENSE
73+
dst: /usr/share/doc/nfpm/copyright
74+
file_info:
75+
mode: 0644
76+
77+
release:
78+
draft: true
79+
replace_existing_draft: true
80+
replace_existing_artifacts: true
81+
make_latest: true
82+
prerelease: auto

0 commit comments

Comments
 (0)