Skip to content

Commit

Permalink
dev: release on github
Browse files Browse the repository at this point in the history
  • Loading branch information
joneskoo committed Feb 12, 2021
1 parent 9206f97 commit 0abe54d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Go

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]

jobs:

Expand Down Expand Up @@ -44,4 +44,4 @@ jobs:
with:
fetch-depth: 1
- run: "go vet ./..."
- run: "$(go env GOPATH)/bin/staticcheck -go 1.11 ./..."
- run: "$(go env GOPATH)/bin/staticcheck -go 1.11 ./..."
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
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.15
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
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 download
builds:
- id: "git-get"
binary: "git-get"
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
format_overrides:
- goos: windows
format: zip

checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^Github:'
- '^dev:'
- '^README:'

0 comments on commit 0abe54d

Please sign in to comment.