diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml index aa947c9..358932a 100644 --- a/.github/workflows/generate.yaml +++ b/.github/workflows/generate.yaml @@ -1,12 +1,9 @@ name: generate - on: workflow_dispatch: - permissions: contents: read packages: write - jobs: release: strategy: diff --git a/.github/workflows/tests.yaml b/.github/workflows/go.yaml similarity index 62% rename from .github/workflows/tests.yaml rename to .github/workflows/go.yaml index d8fefb5..b2b6531 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/go.yaml @@ -1,9 +1,6 @@ -name: tests +name: go on: pull_request: - push: - branches: - - main jobs: lint: runs-on: ubuntu-latest @@ -13,16 +10,10 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.22.x - check-latest: true - cache: true + go-version-file: go.mod - name: Setup golangci-lint uses: golangci/golangci-lint-action@v6 - with: - version: v1.57.2 - args: --timeout 3m0s unit: - needs: lint runs-on: ubuntu-latest steps: - name: Checkout @@ -30,8 +21,6 @@ jobs: - name: Setup Go uses: actions/setup-go@v5 with: - go-version: 1.22.x - check-latest: true - cache: true + go-version-file: go.mod - name: Run tests run: make test diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 2ffb403..56a616c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,13 +1,10 @@ name: release - on: push: tags: - '*' - permissions: contents: write - jobs: release: runs-on: ubuntu-latest @@ -19,9 +16,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.x - check-latest: true - cache: true + go-version-file: go.mod - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: