diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fa3e5e5..855539a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,23 @@ env: XPKG_VERSION: ${{ inputs.version }} jobs: + check-dirty: + runs-on: ubuntu-24.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Run go generate + run: make generate + + - name: Check dirty files from go generate + run: make ci-check-dirty + lint: runs-on: ubuntu-24.04 steps: @@ -144,6 +161,7 @@ jobs: push: runs-on: ubuntu-24.04 needs: + - check-dirty - lint - unit-test - build diff --git a/Makefile b/Makefile index 29b5543..1623c9a 100644 --- a/Makefile +++ b/Makefile @@ -35,9 +35,12 @@ local: build test lint mkdir -p ./.bin GOBIN="$$(pwd)/.bin" go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.2 -.PHONY: build -build: +.PHONY: generate +generate: CGO_ENABLED=0 go generate ./... + +.PHONY: build +build: generate CGO_ENABLED=0 go install -ldflags="$(ldflags)" ./... .PHONY: test