Skip to content

Commit 869986a

Browse files
authored
Merge pull request #20 from amands98/aman/trigu
bump: fix the goreleaser release cycle & Dependabot
2 parents bd4f426 + 1f72e82 commit 869986a

File tree

4 files changed

+33
-15
lines changed

4 files changed

+33
-15
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: gomod
4+
directory: "/"
5+
schedule:
6+
interval: daily

.github/workflows/publish_release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ jobs:
1111
steps:
1212
- name: Check out code
1313
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
1416
- name: Setup go env
1517
uses: actions/setup-go@master
1618
with:
17-
go-version: "1.20"
19+
go-version: "1.21"
1820
- name: goreleaser with tag
1921
uses: goreleaser/goreleaser-action@v5
2022
with:
2123
version: latest
2224
args: release --rm-dist
2325
env:
2426
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25-
26-

.goreleaser.yaml

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
project_name: harbor
22

3+
before:
4+
hooks:
5+
- go mod tidy
6+
37
builds:
4-
- main: ./cmd/harbor
5-
binary: ./harbor
8+
- main: ./cmd/harbor/main.go
9+
610
env:
7-
- CGO_ENABLED=0
11+
- CGO_ENABLED=0
812
ldflags:
913
- -w -s -X github.com/goharbor/harbor-cli/cmd/harbor/internal/version.GitCommit={{.FullCommit}}
1014
goos:
@@ -14,24 +18,32 @@ builds:
1418
goarch:
1519
- amd64
1620
- arm64
17-
- arm
21+
- arm
1822
ignore:
1923
- goos: windows
2024
goarch: arm
2125
- goos: windows
2226
goarch: arm64
2327
archives:
24-
- format: tar.gz
25-
format_overrides:
26-
- goos: windows
27-
format: zip
28+
- format: tar.gz
29+
format_overrides:
30+
- goos: windows
31+
format: zip
32+
33+
checksum:
34+
name_template: 'checksums.txt'
35+
36+
snapshot:
37+
name_template: "{{ .Tag }}-next"
38+
2839
release:
29-
draft: true
30-
prerelease: auto
40+
name_template: "HarborCLI {{.Tag}}"
41+
# draft: true
42+
# prerelease: auto
3143

3244
changelog:
3345
sort: asc
3446
filters:
3547
exclude:
3648
- "^docs:"
37-
- "^test:"
49+
- "^test:"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/goharbor/harbor-cli
22

3-
go 1.20
3+
go 1.21
44

55
require github.com/spf13/cobra v1.7.0
66

0 commit comments

Comments
 (0)