Skip to content

Commit

Permalink
Initial release, and added goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
chrsmutti committed Nov 2, 2019
1 parent 3dfeb74 commit 3f75706
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 24 deletions.
42 changes: 20 additions & 22 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
name: Go
on: [push]
jobs:

build:
name: Build
on:
- pull_request
- push

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Checkout
uses: actions/checkout@v1

- name: Build
run: go build -v .
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
bin
# Release folders
bin
dist

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
vendor/
23 changes: 23 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
BINARY := bin/git-multi
NAME := git-multi
BINARY := dist/$(NAME)
GOBIN := $(GOPATH)/bin

build: $(BINARY)
Expand All @@ -7,3 +8,6 @@ $(BINARY): *.go

install: build
GOBIN=$(GOBIN) go install

clean:
@rm -rf ./dist

0 comments on commit 3f75706

Please sign in to comment.