name: Go presubmit

on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, reopened, synchronize]

jobs:
  build:
    name: Go presubmit
    runs-on: ubuntu-latest
    strategy:
      matrix:
        go-version: ["1.23", "stable"]
    steps:
      - name: Install Go ${{ matrix.go-version }}
        uses: actions/setup-go@v5
        with:
          go-version: ${{ matrix.go-version }}
      - uses: actions/checkout@v4
      - uses: creachadair/go-presubmit-action@v2
        with:
          staticcheck-version: "2024.1.1"
