Skip to content

Commit ccc2629

Browse files
committed
init
0 parents  commit ccc2629

29 files changed

Lines changed: 4006 additions & 0 deletions

.github/.goreleaser.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
version: 2
2+
3+
project_name: hydectl
4+
5+
before:
6+
hooks:
7+
- go mod tidy
8+
9+
builds:
10+
- env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
goarch:
15+
- amd64
16+
- arm64
17+
- arm
18+
main: ./main.go
19+
binary: "hydectl"
20+
ldflags:
21+
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}
22+
23+
archives:
24+
- id: default
25+
formats:
26+
- tar.gz
27+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
28+
29+
files:
30+
- LICENSE
31+
- README.md
32+
33+
- id: binary
34+
format: binary
35+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
36+
37+
38+
nfpms:
39+
- vendor: "HyDE-Project"
40+
homepage: "https://github.com/HyDE-Project/hydectl"
41+
maintainer: "HyDE-Project <contact@hyde-project.org>"
42+
description: "HyDE CLI tool"
43+
license: "GPL-3.0"
44+
formats:
45+
- deb
46+
- rpm
47+
- archlinux
48+
bindir: /usr/bin
49+
section: utils
50+
priority: optional
51+
contents:
52+
- src: ./LICENSE
53+
dst: /usr/share/licenses/hydectl/LICENSE
54+
- src: ./README.md
55+
dst: /usr/share/doc/hydectl/README.md
56+
57+
checksum:
58+
name_template: "checksums.txt"
59+
60+
changelog:
61+
sort: asc
62+
filters:
63+
exclude:
64+
- "^docs:"
65+
- "^test:"
66+
- "^ci:"
67+
- "^chore:"

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Go Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
branches:
8+
- master
9+
10+
permissions:
11+
contents: write
12+
packages: write
13+
issues: write
14+
15+
jobs:
16+
goreleaser:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Go
25+
uses: useblacksmith/setup-go@v6
26+
with:
27+
go-version: "1.24.1"
28+
29+
- name: Run GoReleaser (tag)
30+
if: startsWith(github.ref, 'refs/tags/v')
31+
uses: goreleaser/goreleaser-action@v5
32+
with:
33+
distribution: goreleaser
34+
version: v2.11.0
35+
args: release --clean --config .github/.goreleaser.yaml
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Upload hydectl binary artifact
40+
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: hydectl-binaries
44+
path: dist/hydectl*
45+
46+
- name: Run GoReleaser (master)
47+
if: github.ref == 'refs/heads/master'
48+
uses: goreleaser/goreleaser-action@v5
49+
with:
50+
distribution: goreleaser
51+
version: v2.11.0
52+
args: release --clean --config .github/.goreleaser.yaml
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)