-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (44 loc) · 1.23 KB
/
build.yaml
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
name: Go Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.3
cache: false
- name: Checkout code
uses: actions/checkout@v4
- name: Build and tests
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
LANG: en_US.UTF-8
shell: 'script -q -e -c "bash {0}"'
run: make --trace all
- name: Send coverage report
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: ./build/test-all.cover
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23.3
- name: Checkout code
uses: actions/checkout@v4
- name: Release new version
env:
GH_TOKEN: ${{ github.token }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: make --trace version-release
- name: Publish new version
env:
GH_TOKEN: ${{ github.token }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
run: sleep 60 && make --trace version-publish || true