Skip to content

Commit

Permalink
feat: add go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
abtris committed Apr 4, 2021
1 parent 89d11c2 commit ad2adb4
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16

# - name: Build
# run: go build -v ./...

- name: Test
run: go test -v ./...

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
workdir: ./cli
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ dist

# TernJS port file
.tern-port
dist/
34 changes: 34 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Make sure to check the documentation at http://goreleaser.com
project_name: gab
before:
hooks:
- go mod tidy
builds:
- id: gab
main: ./cli/main.go
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
files:
- LICENSE
- README.md
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

0 comments on commit ad2adb4

Please sign in to comment.