Skip to content

Commit

Permalink
gha: use go version from go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller committed Nov 26, 2023
1 parent 6da9925 commit 707b75a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version-file: go.mod

- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2

# installed here to run lint on the .goreleaser.yml file:
- name: Install GoReleaser
Expand All @@ -39,21 +37,18 @@ jobs:
- run: make test

release-test:
runs-on: ubuntu-latest
# only run goreleaser snapshot on non-main branch
if: github.ref != 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version-file: go.mod

- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2

# installed here to run lint on the .goreleaser.yml file:
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
Expand All @@ -62,10 +57,10 @@ jobs:
- run: make snapshot

release:
if: github.ref == 'refs/heads/main'
needs: [test]
runs-on: ubuntu-latest
# only create a release on main builds:
if: github.ref == 'refs/heads/main'
steps:
- name: checkout code with full history (unshallow)
uses: actions/checkout@v3
Expand All @@ -77,7 +72,7 @@ jobs:

- uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version-file: go.mod

- name: install autotag binary
run: |
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/planetscale/ghcommit

go 1.20
go 1.21.4

require (
github.com/jessevdk/go-flags v1.5.0
Expand Down

0 comments on commit 707b75a

Please sign in to comment.