Skip to content

Commit

Permalink
update release workflow & generate new .goreleaser.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
druppelt committed Sep 11, 2024
1 parent c67ca9a commit dd06500
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 35 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v4
with:
go-version: 1.17
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Run goreleaser
uses: goreleaser/goreleaser-action@v1
uses: goreleaser/goreleaser-action@v6
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update new version in krew-index
uses: rajatjindal/[email protected]
# disable krew install for now as this would conflict with the original. I'd have to rename the project to do this safely.
# - name: Update new version in krew-index
# uses: rajatjindal/[email protected]
41 changes: 41 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of `uname`.
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 }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
28 changes: 0 additions & 28 deletions .goreleaser.yml

This file was deleted.

0 comments on commit dd06500

Please sign in to comment.