Skip to content

Commit 3f75706

Browse files
committed
Initial release, and added goreleaser
1 parent 3dfeb74 commit 3f75706

4 files changed

Lines changed: 67 additions & 24 deletions

File tree

.github/workflows/go.yml

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
name: Go
2-
on: [push]
3-
jobs:
42

5-
build:
6-
name: Build
3+
on:
4+
- pull_request
5+
- push
6+
7+
jobs:
8+
goreleaser:
79
runs-on: ubuntu-latest
810
steps:
11+
- name: Set up Go 1.13
12+
uses: actions/setup-go@v1
13+
with:
14+
go-version: 1.13
15+
id: go
916

10-
- name: Set up Go 1.13
11-
uses: actions/setup-go@v1
12-
with:
13-
go-version: 1.13
14-
id: go
15-
16-
- name: Check out code into the Go module directory
17-
uses: actions/checkout@v1
18-
19-
- name: Get dependencies
20-
run: |
21-
go get -v -t -d ./...
22-
if [ -f Gopkg.toml ]; then
23-
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
24-
dep ensure
25-
fi
17+
- name: Checkout
18+
uses: actions/checkout@v1
2619

27-
- name: Build
28-
run: go build -v .
20+
- name: Run GoReleaser
21+
uses: goreleaser/goreleaser-action@v1
22+
with:
23+
version: latest
24+
args: release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
bin
1+
# Release folders
2+
bin
3+
dist
4+
5+
# Binaries for programs and plugins
6+
*.exe
7+
*.exe~
8+
*.dll
9+
*.so
10+
*.dylib
11+
12+
# Test binary, built with `go test -c`
13+
*.test
14+
15+
# Output of the go coverage tool, specifically when used with LiteIDE
16+
*.out
17+
18+
# Dependency directories (remove the comment below to include it)
19+
vendor/

.goreleaser.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
archives:
8+
- replacements:
9+
darwin: Darwin
10+
linux: Linux
11+
windows: Windows
12+
386: i386
13+
amd64: x86_64
14+
checksum:
15+
name_template: "checksums.txt"
16+
snapshot:
17+
name_template: "{{ .Tag }}-next"
18+
changelog:
19+
sort: asc
20+
filters:
21+
exclude:
22+
- "^docs:"
23+
- "^test:"

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
BINARY := bin/git-multi
1+
NAME := git-multi
2+
BINARY := dist/$(NAME)
23
GOBIN := $(GOPATH)/bin
34

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

89
install: build
910
GOBIN=$(GOBIN) go install
11+
12+
clean:
13+
@rm -rf ./dist

0 commit comments

Comments
 (0)