-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (40 loc) · 1021 Bytes
/
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
name: build and release
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-and-build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
arch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.23'
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test -v -race ./... && go build -race ./...
build-and-release:
runs-on: ubuntu-latest
needs: test-and-build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run Auto Tag
uses: phish108/autotag-action@v1.1.55
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
with-v: "true"