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
|
name: test
on:
push:
pull_request:
jobs:
build:
name: Build and Test
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
go-version: [1.15, 1.19, 1.22]
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Build
run: |
make
- name: Run tests
run: |
make test
- name: Create release tarball
if: startsWith(github.ref, 'refs/tags/')
run: |
make release
- uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
name: release-${{ matrix.go-version }}
path: dist/*
|