-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (52 loc) · 1.52 KB
/
tool.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: 'tool'
on:
push:
tags:
- '*'
- '!tip'
branches:
- '*'
paths:
- '.github/workflows/tool.yml'
- 'tool/**'
jobs:
tool:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v1
with:
go-version: '1.13.x'
- name: golangci-lint
run: |
cd tool
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./ latest
./golangci-lint run -v
- name: script test
run: |
go get -u github.com/kyoh86/richgo
go get -u github.com/wadey/gocovmerge
cd tool
`go env GOPATH`/bin/richgo test -count=1 -cover -v ./...
`go env GOPATH`/bin/gocovmerge coverage*.out > cover.out
go tool cover -func=cover.out
rm cover*.out
- name: goreleaser
run: |
cd tool
curl -fsSL https://git.io/goreleaser | sh -s -- --snapshot --skip-publish --rm-dist
cp dist/issue-runner_linux_amd64/issue-runner ../issue-runner
- name: binary test
run: |
./tool/test.sh
- name: prepare artifacts
run: |
mkdir -p tool/dist/binaries
cd tool/dist/binaries
mv ../issue-runner_linux_amd64/issue-runner issue-runner_lin_amd64
mv ../issue-runner_windows_amd64/issue-runner.exe issue-runner_win_amd64.exe
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: tool/dist/binaries/*