From 887fc682fe1f62c0bdf968f8f89073eb041ed3f4 Mon Sep 17 00:00:00 2001 From: Mathis Maquenne <124215603+mathismqn@users.noreply.github.com> Date: Thu, 30 Jul 2026 10:35:37 +0200 Subject: [PATCH] ops: add ci workflow --- .github/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..301ac06 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: ci + +on: + push: + branches: [dev, main] + pull_request: + branches: [dev, main] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Check formatting + run: | + unformatted=$(gofmt -l .) + if [ -n "$unformatted" ]; then + echo "Not gofmt'd:" + echo "$unformatted" + exit 1 + fi + + - run: go vet ./... + + - run: go build ./... + + # Catches a broken release config before a tag is pushed. + - uses: goreleaser/goreleaser-action@v6 + with: + version: '~> v2' + args: check