-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (41 loc) · 1.16 KB
/
build.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
##
## Build the main branch
##
name: build
on:
push:
branches:
- main
- /refs/heads/main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.21"
- uses: actions/[email protected]
- name: go build
run: |
go build ./...
- name: go test
run: |
go test -v -coverprofile=profile.cov $(go list ./... | grep -v /examples/)
env:
## GOPATH required to build serverless app inside unittest
GOPATH: /home/runner/work/${{ github.event.repository.name }}/go
- uses: shogo82148/actions-goveralls@v1
continue-on-error: true
with:
path-to-profile: profile.cov
- uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: patch
- name: publish
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git tag ${{ steps.version.outputs.v-version }}
git push origin -u ${{ steps.version.outputs.v-version }}