Skip to content

Commit

Permalink
Set up goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
suzaku committed Sep 16, 2021
1 parent af21959 commit a88f835
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,26 @@ jobs:
with:
fetch-depth: 0
- uses: actions/setup-go@v2
- run: go test ./...
with:
go-version: 1.17
- run: go test ./...
goreleaser:
needs: [ golangci, test ]
if: success() && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
31 changes: 31 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- 386
- amd64
- arm
- arm64
mod_timestamp: '{{ .CommitTimestamp }}'
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: Mac
linux: Linux
386: i386
amd64: x86_64

brews:
- tap:
owner: suzaku
name: homebrew
folder: Formula
homepage: https://github.com/suzaku/rose
description: A command line tool that allows you to treat files as sets of rows and perform set operations on them.
test: |
system "#{bin}/rose -v"
install: |-
bin.install "rose"

0 comments on commit a88f835

Please # to comment.