File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name-template : " v$RESOLVED_VERSION"
2+ tag-template : " v$RESOLVED_VERSION"
3+ template : |
4+ ## What's Changed
5+
6+ $CHANGES
7+
8+ categories :
9+ - title : " Breaking Changes"
10+ labels :
11+ - " breaking_changes"
12+ - title : " New Features"
13+ labels :
14+ - " feature_request"
15+ - " enhancement"
16+ - title : " Bug Fixes"
17+ labels :
18+ - " bug"
19+ - title : " Documentation"
20+ labels :
21+ - " documentation"
22+ - title : " Dependencies"
23+ labels :
24+ - " dependencies"
25+ - title : " Maintenance"
26+ labels :
27+ - " maintenance"
28+ - " github_actions"
29+
30+ version-resolver :
31+ minor :
32+ labels :
33+ - " breaking_changes" # intentionally minor: project is pre-1.0
34+ - " feature_request"
35+ - " enhancement"
36+ patch :
37+ labels :
38+ - " bug"
39+ - " documentation"
40+ - " dependencies"
41+ - " maintenance"
42+
43+ change-template : " - $TITLE (#$NUMBER) @$AUTHOR"
44+ no-changes-template : " - No changes"
Original file line number Diff line number Diff line change 1+ name : Release Drafter
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ update-release-draft :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : release-drafter/release-drafter@v6
17+ with :
18+ config-name : release-drafter.yml
19+ env :
20+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -33,9 +33,6 @@ linters-settings:
3333 check-shadowing : true
3434 lll :
3535 line-length : 120
36- govet :
37- enable :
38- - fieldalignment
3936 misspell :
4037 locale : US
4138
Original file line number Diff line number Diff line change 1+ version : 2
2+
13project_name : kvs
24
35env :
@@ -44,11 +46,9 @@ archives:
4446 - README.md
4547 - CHANGELOG.md
4648 - CODE_OF_CONDUCT.md
47- - CONTRIBUTING.md
48- - SECURITY.md
4949
5050changelog :
51- skip : true
51+ disable : false
5252
5353checksum :
5454 algorithm : sha256
@@ -77,25 +77,30 @@ brews:
7777 skip_upload : false
7878
7979dockers :
80- - ids :
81- - kvs
80+ - images :
81+ - ghcr.io/skyoo2003/ kvs
8282 dockerfile : Dockerfile.goreleaser
83- use_buildx : true
84- image_templates :
85- - " ghcr.io/skyoo2003/kvs:{{ .Tag }}-alpine"
86- - " ghcr.io/skyoo2003/kvs:v{{ .Major }}.{{ .Minor }}-alpine"
87- - " ghcr.io/skyoo2003/kvs:v{{ .Major }}-alpine"
88- - " ghcr.io/skyoo2003/kvs:latest-alpine"
89- build_flag_templates :
90- - " --label=org.opencontainers.image.created={{ .Date }}"
91- - " --label=org.opencontainers.image.title={{ .ProjectName }}"
92- - " --label=org.opencontainers.image.revision={{ .FullCommit }}"
93- - " --label=org.opencontainers.image.version={{ .Version }}"
94- skip_push : false
83+ ids :
84+ - kvs
85+ sbom : false
86+ flags :
87+ - " --provenance=false"
88+ tags :
89+ - " {{ .Tag }}-alpine"
90+ - " v{{ .Major }}.{{ .Minor }}-alpine"
91+ - " v{{ .Major }}-alpine"
92+ - " latest-alpine"
93+ labels :
94+ org.opencontainers.image.created : " {{ .Date }}"
95+ org.opencontainers.image.source : " https://github.com/skyoo2003/kvs"
96+ org.opencontainers.image.title : " {{ .ProjectName }}"
97+ org.opencontainers.image.revision : " {{ .FullCommit }}"
98+ org.opencontainers.image.version : " {{ .Version }}"
9599
96100release :
97101 github :
98102 owner : skyoo2003
99103 name : kvs
100104 name_template : " v{{ .Version }}"
101105 disable : false
106+ mode : replace
Original file line number Diff line number Diff line change 1- FROM alpine:3.23
1+ FROM --platform=$BUILDPLATFORM alpine:3.23
22
3+ RUN adduser --system --home /kvs appuser
34VOLUME /kvs
45WORKDIR /kvs
5- COPY kvs /usr/bin/kvs
6+ ARG TARGETOS
7+ ARG TARGETARCH
8+ COPY ${TARGETOS}/${TARGETARCH}/kvs /usr/bin/kvs
69
710EXPOSE 3456
811
12+ USER appuser
913ENTRYPOINT ["kvs"]
Original file line number Diff line number Diff line change 1- .PHONY : all setup clean build test lint
1+ .PHONY : all setup clean build test lint lint-fix vet coverage race
22
3- all : lint test build
3+ all : vet lint test build
44
55setup :
66 @pre-commit install
1616
1717lint :
1818 @golangci-lint run ./...
19+
20+ lint-fix :
21+ @golangci-lint run --fix ./...
22+
23+ vet :
24+ @go vet ./...
25+
26+ coverage :
27+ @go test ./... -coverprofile=coverage.out -covermode=atomic
28+ @go tool cover -html=coverage.out -o coverage.html
29+ @echo " Coverage report: coverage.html"
30+
31+ race :
32+ @go test -race ./...
Original file line number Diff line number Diff line change 1- # Changelog
2- All notable changes to this project will be documented in this file.
3-
4- The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5- adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) ,
6- and is generated by [ Changie] ( https://github.com/miniscruff/changie ) .
You can’t perform that action at this time.
0 commit comments