-
Notifications
You must be signed in to change notification settings - Fork 115
39 lines (30 loc) · 851 Bytes
/
go.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
name: Go
on: [ push, pull_request ]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# match the minimum supported and the latest Go versions
go_version: [ '1.22', '^1.22' ]
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}
check-latest: true
- name: Test
run: go test ./...
- run: mkdir -p ./bin/tools
- name: Build tools
run: go build -o ./bin/tools ./examples/...
- name: Upload tools
if: ${{ startsWith(matrix.go_version, '^') }}
uses: actions/upload-artifact@v3
with:
name: tools
path: ./bin/tools