Skip to content

Commit 16e1d2b

Browse files
chore: test matrix build
1 parent 067ed6b commit 16e1d2b

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,30 @@ jobs:
1111

1212
build:
1313
name: Build and Run
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
os: [macos-latest, windows-latest, ubuntu-latest]
19+
steps:
20+
- name: Set up Go 1.14
21+
uses: actions/setup-go@v1
22+
with:
23+
go-version: 1.14
24+
25+
- name: Check out code
26+
uses: actions/checkout@v2
27+
28+
- name: Build
29+
run: go build ./cmd/semantic-release/
30+
31+
- name: Test
32+
run: go test -v ./...
33+
34+
release:
35+
name: Release
1436
runs-on: ubuntu-latest
37+
needs: build
1538
steps:
1639
- name: Set up Go 1.14
1740
uses: actions/setup-go@v1
@@ -23,25 +46,22 @@ jobs:
2346
with:
2447
node-version: 10.x
2548

26-
- name: Check out code into the Go module directory
49+
- name: Check out code
2750
uses: actions/checkout@v2
2851

52+
- name: Build
53+
run: go build ./cmd/semantic-release/
54+
2955
- name: Setup PATH
3056
run: echo "::add-path::~/go/bin"
3157

32-
- name: Get dependencies
58+
- name: Get release dependencies
3359
run: |
3460
go get github.com/mitchellh/gox
3561
go get github.com/tcnksm/ghr
36-
go get -v -t -d ./...
37-
38-
- name: Build
39-
run: go build ./cmd/semantic-release/
40-
41-
- name: Test
42-
run: go test -v ./...
4362
4463
- name: Release
4564
env:
4665
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4767
run: ./scripts/release || exit 0

0 commit comments

Comments
 (0)