-
-
Notifications
You must be signed in to change notification settings - Fork 18
61 lines (58 loc) · 1.76 KB
/
release.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
name: Release
on:
push:
branches:
- master
jobs:
test:
name: 'Testing'
runs-on: ubuntu-latest
strategy:
matrix:
go:
- '1.18'
- '1.17'
- '1.16'
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '${{ matrix.go }}'
- name: Invoking go test
run: go test ./...
release:
name: 'Release to GitHub'
runs-on: ubuntu-latest
needs:
- test
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.18'
- name: Invoking go vet and binaries generation
run: |
go vet ./...
GOOS=darwin GOARCH=amd64 go build -o=.github/workflows/asyncapi-parser.darwin.amd64 ./cmd/api-parser/main.go
GOOS=linux GOARCH=amd64 go build -o=.github/workflows/asyncapi-parser.linux.amd64 ./cmd/api-parser/main.go
GOOS=windows GOARCH=amd64 go build -o=.github/workflows/asyncapi-parser.windows.amd64.exe ./cmd/api-parser/main.go
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Add plugin for conventional commits
run: npm install conventional-changelog-conventionalcommits
working-directory: ./.github/workflows
- name: Release to GitHub
working-directory: ./.github/workflows
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_AUTHOR_NAME: asyncapi-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: asyncapi-bot
GIT_COMMITTER_EMAIL: [email protected]
run: npx [email protected]