From 544e2e157ddb1facf42bef7035ccaf94304a7536 Mon Sep 17 00:00:00 2001 From: Kevin Franklin Kim Date: Wed, 10 Jul 2024 07:02:52 +0200 Subject: [PATCH] chore: update configs --- .github/workflows/release.yml | 5 ++--- .github/workflows/test.yml | 2 +- .gitignore | 29 ++++++++++++++++++++--------- .goreleaser.yml | 7 +++---- Makefile | 19 +++++++++++-------- 5 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef01a46..0186001 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - - name: Unshallow - run: git fetch --prune --unshallow + with: + fetch-depth: 0 - uses: actions/setup-go@v5 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 29e845a..e353f3d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: checks +name: Test Branch on: push: diff --git a/.gitignore b/.gitignore index e99ac8f..b711704 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,25 @@ .* +*.zip +*.tar +*.out *.log -!.github/ -!.husky/ -!.editorconfig +/bin/ +/tmp/ + +## Git +!.gitkeep !.gitignore + +## GitHub +!.github/ + +## Editorconfig +!.editorconfig + +## Husky +!.husky/ +!.husky.yaml + +## Golang !.golangci.yml !.goreleaser.yml -!.husky.yaml -!.yamllint.yaml -/bin/ -/coverage.out -/coverage.html -/tmp/ diff --git a/.goreleaser.yml b/.goreleaser.yml index 8366ab1..77cdeb2 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,5 @@ -# .goreleaser.yml -# Build customization +version: 2 + builds: - binary: sesamy main: ./main.go @@ -13,7 +13,7 @@ builds: - amd64 - arm64 goarm: - - 7 + - '7' flags: - -trimpath ldflags: @@ -32,7 +32,6 @@ changelog: use: github-native brews: - # Repository to push the tap to. - repository: owner: foomo name: homebrew-tap diff --git a/Makefile b/Makefile index 23618d9..052ae31 100644 --- a/Makefile +++ b/Makefile @@ -49,19 +49,22 @@ tidy: outdated: @go list -u -m -json all | go-mod-outdated -update -direct -## Install binary -install: - @go build -o ${GOPATH}/bin/sesamy main.go - -## Install debug binary -install.debug: - @go build -gcflags "all=-N -l" -o ${GOPATH}/bin/sesamy main.go - +.PHONY: build ## Build binary build: @mkdir -p bin @go build -o bin/sesamy main.go +.PHONY: install +## Install binary +install: + @go build -o ${GOPATH}/bin/sesamy main.go + +.PHONY: install.debug +## Install debug binary +install.debug: + @go build -gcflags "all=-N -l" -o ${GOPATH}/bin/sesamy main.go + ## === Utils === ## Show help text