Skip to content

Commit

Permalink
Merge pull request #4 from kanmu/add_goreleaser
Browse files Browse the repository at this point in the history
Introduce goreleaser
  • Loading branch information
winebarrel committed Dec 9, 2022
2 parents 2b1a712 + a7441f6 commit f43cba5
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: goreleaser
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
with:
go-version: ">=1.19.2"
- id: gh-app-auth
uses: summerwind/gh-app-auth@main
with:
app-id: 244816
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
account: kanmu
- uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ steps.gh-app-auth.outputs.token }}
34 changes: 34 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
before:
hooks:
- go mod tidy
builds:
- ldflags:
- -X main.version={{.Version}}
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
checksum:
name_template: "checksums.txt"
brews:
- tap:
owner: kanmu
name: homebrew-tools
homepage: https://github.com/kanmu/prmdg
description: prmd style JSON Hyper Schema to Go structs, and validators
license: MIT
install: |
bin.install 'prmdg'
nfpms:
- id: prmdg-nfpms
file_name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Arch }}"
homepage: https://github.com/kanmu/prmdg
maintainer: Akira Chiku <[email protected]>
description: prmd style JSON Hyper Schema to Go structs, and validators
license: MIT
formats:
- deb
- rpm
bindir: /usr/bin

0 comments on commit f43cba5

Please sign in to comment.