From 94ce877782dc7270dd53764c44b990917aa113ad Mon Sep 17 00:00:00 2001 From: Lucas dos Santos Abreu Date: Sat, 5 Aug 2023 19:57:01 -0300 Subject: [PATCH] (wip) --- .github/workflows/release.yml | 4 ++-- .goreleaser.yml | 25 +++++++++++++------------ Makefile | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86a262f3..fe4680ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: pull_request: push: tags: - - '*' + - "*" jobs: goreleaser: @@ -23,7 +23,7 @@ jobs: mkdir -p $HOME/.cache/snapcraft/download mkdir -p $HOME/.cache/snapcraft/stage-packages - name: goreleaser-setup - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser version: latest diff --git a/.goreleaser.yml b/.goreleaser.yml index a7d2f4de..16af972f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -12,12 +12,13 @@ builds: archives: - id: default - replacements: - darwin: Darwin - linux: Linux - windows: Windows - 386: i386 - amd64: x86_64 + 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 @@ -25,17 +26,17 @@ archives: - LICENSE checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt" snapshot: - name_template: '{{ .Tag }}-next' + name_template: "{{ .Tag }}-next" changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' + - "^docs:" + - "^test:" snapcrafts: - name: clockify-cli @@ -47,10 +48,10 @@ snapcrafts: apps: clockify-cli: - plugs: ['network'] + plugs: ["network"] brews: - - tap: + - repository: owner: lucassabreu name: homebrew-tap folder: Formula diff --git a/Makefile b/Makefile index 964c9b2b..018959ae 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ tag= release: ## releases a tagged version sed "/^## \[$(tag)/, /^## \[/!d" CHANGELOG.md | tail -n +2 | head -n -2 > /tmp/rn.md curl -sL https://git.io/goreleaser | bash /dev/stdin --release-notes /tmp/rn.md \ - --rm-dist $(if $(SNAPSHOT),--snapshot --skip-publish,) + --clean $(if $(SNAPSHOT),--snapshot --skip-publish,) ifneq ($(SNAPSHOT),1) curl -X POST -d '{"trigger_branch":"$(tag)","trigger_title":"Releasing $(tag)"}' https://api.netlify.com/build_hooks/5eef4f99028bddbb4093e4c6 -v endif