Skip to content

Commit

Permalink
fix codeql and simplify builds
Browse files Browse the repository at this point in the history
  • Loading branch information
spali committed Apr 17, 2024
1 parent a71a7e2 commit 04ffebf
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Lint
uses: golangci/golangci-lint-action@v4
with:
Expand All @@ -36,16 +37,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
go: [1.22]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Setup Go ${{ matrix.go }}"
- name: "Setup Go"
uses: actions/setup-go@v5
with:
go-version: "${{ matrix.go }}"
go-version-file: go.mod
check-latest: true
- name: "Setup Go modules cache"
uses: "actions/cache@v4"
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
# workaround for https://github.com/github/codeql/issues/15647
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Initialize
uses: github/codeql-action/init@v3
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod
check-latest: true
- name: Create release
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/
- name: Determine Go version from go.mod
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
go-version-file: go.mod
check-latest: true
- name: Create release
uses: goreleaser/goreleaser-action@v5
with:
Expand Down

0 comments on commit 04ffebf

Please sign in to comment.