Skip to content

Commit 751ba44

Browse files
authored
Merge pull request #1 from kitagry/add-ci
2 parents 7638f28 + 00d3a27 commit 751ba44

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/release.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
release:
3+
types: [created]
4+
5+
jobs:
6+
releases-matrix:
7+
name: Release Go Binary
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
# build and publish in parallel: linux/386, linux/amd64, windows/386, windows/amd64, darwin/amd64
12+
goos: [linux, windows, darwin]
13+
goarch: ["386", amd64]
14+
exclude:
15+
- goarch: "386"
16+
goos: darwin
17+
steps:
18+
- uses: actions/checkout@v2
19+
- uses: wangyoucao577/[email protected]
20+
with:
21+
github_token: ${{ secrets.GITHUB_TOKEN }}
22+
goos: ${{ matrix.goos }}
23+
goarch: ${{ matrix.goarch }}
24+
project_path: "./"
25+
binary_name: "kj"

.github/workflows/test.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
name: Build
14+
runs-on: ubuntu-latest
15+
steps:
16+
17+
- name: Set up Go 1.x
18+
uses: actions/setup-go@v2
19+
with:
20+
go-version: ^1.16
21+
id: go
22+
23+
- name: Check out code into the Go module directory
24+
uses: actions/checkout@v2
25+
26+
- name: Get dependencies
27+
run: |
28+
go mod download
29+
30+
- name: Test
31+
run: |
32+
go test ./...

0 commit comments

Comments
 (0)