diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f31e5d..9edcb23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.24.2" - name: Cache Go modules uses: actions/cache@v5 with: @@ -28,6 +28,8 @@ jobs: ${{ runner.os }}-go- - name: Download dependencies run: go mod download + - name: Run go vet + run: go vet ./... - name: Run tests run: go test ./... @@ -39,7 +41,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.24.2" - name: Cache Go modules uses: actions/cache@v5 with: @@ -49,6 +51,8 @@ jobs: ${{ runner.os }}-go- - name: Download dependencies run: go mod download + - name: Run go vet + run: go vet ./... - name: Build run: go build -v ./... @@ -63,7 +67,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v6 with: - go-version: "1.25" + go-version: "1.24.2" - name: Cache Go modules uses: actions/cache@v5 with: @@ -73,6 +77,8 @@ jobs: ${{ runner.os }}-go- - name: Download dependencies run: go mod download + - name: Run go vet + run: go vet ./... - name: Calculate next tag run: | latest_tag=$(git tag --sort=-version:refname | head -1) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3bb5eb0..fd22af7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,8 +11,25 @@ permissions: contents: write jobs: + vet: + name: static-analysis + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24.2' + cache: true + - name: Download dependencies + run: go mod download + - name: Run go vet + run: go vet ./... + build: name: Build & Release (${{ matrix.suffix }}) + needs: [vet] runs-on: ubuntu-latest strategy: @@ -44,7 +61,7 @@ jobs: uses: actions/setup-go@v5 with: # Keep in sync with the go directive in go.mod. - go-version: '1.24' + go-version: '1.24.2' cache: true - name: Download dependencies