Skip to content

Commit

Permalink
Merge pull request #6 from Syuparn/introduce-goreleaser
Browse files Browse the repository at this point in the history
introduce goreleaser
  • Loading branch information
Syuparn authored Feb 20, 2021
2 parents 7554b5c + 75eb486 commit e0c4c28
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 34 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
project_name: tmplscript
env:
- GO111MODULE=on
before:
hooks:
- go mod tidy
builds:
- main: .
binary: tmplscript
ldflags:
- -s -w
- -X main.Version={{.Version}}
- -X main.Revision={{.ShortCommit}}
env:
- CGO_ENABLED=0
goos:
- freebsd
- windows
- linux
goarch:
- 386
- amd64
- arm
- arm64
archives:
- name_template: '{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: darwin
linux: linux
windows: windows
386: i386
amd64: x86_64
release:
prerelease: auto
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@

executable go-template command (like awk and jq!)

# install

Get binary [here](https://github.com/Syuparn/tmplscript/releases).

You can also install from `go get`.

```bash
$ go get -u github.com/syuparn/tmplscript
```

# usage

```bash
Expand Down

0 comments on commit e0c4c28

Please sign in to comment.