Skip to content

Commit

Permalink
fix: adjust build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
snakeice committed Aug 2, 2024
1 parent 0837327 commit 64d6fe6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,9 @@ jobs:
id: go

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --rm-dist
version: '~> v2'
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Upload assets
# uses: actions/upload-artifact@v2
# with:
# name: kafta
# path: dist/*
51 changes: 51 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: 2

before:
hooks:
- go mod tidy
- go generate ./...

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
- arm
- ppc64le
goarm:
- '7'
flags:
- -trimpath
ldflags:
- -s -w -X github.com/electric-saw/kafta/internal/version.version={{.Tag}}
- -X github.com/electric-saw/kafta/internal/version.metadata={{.Branch}}
- -X github.com/electric-saw/kafta/internal/version.gitCommit={{.ShortCommit}}
main: ./cmd/kafta

archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
File renamed without changes.

0 comments on commit 64d6fe6

Please sign in to comment.