ops: add ci workflow

This commit is contained in:
Mathis Maquenne
2026-07-30 11:30:08 +02:00
parent 3acd1aeb4f
commit 887fc682fe
+40
View File
@@ -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