Skip to content

Commit 67372f7

Browse files
authored
Merge pull request #42 from planetscale/gha/use-go.mod-version
2 parents b672779 + 26cec4f commit 67372f7

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,13 @@ jobs:
1919
test:
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323

2424
- uses: actions/setup-go@v4
2525
with:
26-
go-version: "1.20"
26+
go-version-file: go.mod
2727

2828
- uses: golangci/golangci-lint-action@v3
29-
with:
30-
version: v1.52.2
3129

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

4139
release-test:
42-
runs-on: ubuntu-latest
4340
# only run goreleaser snapshot on non-main branch
4441
if: github.ref != 'refs/heads/main'
42+
runs-on: ubuntu-latest
4543
steps:
46-
- uses: actions/checkout@v3
44+
- uses: actions/checkout@v4
4745

4846
- uses: actions/setup-go@v4
4947
with:
50-
go-version: "1.20"
48+
go-version-file: go.mod
5149

5250
- uses: golangci/golangci-lint-action@v3
53-
with:
54-
version: v1.52.2
5551

56-
# installed here to run lint on the .goreleaser.yml file:
5752
- name: Install GoReleaser
5853
uses: goreleaser/goreleaser-action@v4
5954
with:
@@ -62,22 +57,20 @@ jobs:
6257
- run: make snapshot
6358

6459
release:
60+
if: github.ref == 'refs/heads/main'
6561
needs: [test]
6662
runs-on: ubuntu-latest
6763
# only create a release on main builds:
68-
if: github.ref == 'refs/heads/main'
6964
steps:
7065
- name: checkout code with full history (unshallow)
71-
uses: actions/checkout@v3
66+
uses: actions/checkout@v4
7267
with:
7368
fetch-depth: 0
74-
75-
- name: fetch tags
76-
run: git fetch --force --tags
69+
fetch-tags: true
7770

7871
- uses: actions/setup-go@v4
7972
with:
80-
go-version: "1.20"
73+
go-version-file: go.mod
8174

8275
- name: install autotag binary
8376
run: |

.github/workflows/licensing.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,13 @@ jobs:
1414
licensing:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20+
21+
- uses: actions/setup-go@v4
22+
with:
23+
go-version-file: go.mod
24+
2025
- run: sudo gem install license_finder
2126
- run: license_finder

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/planetscale/ghcommit
22

3-
go 1.20
3+
go 1.21.4
44

55
require (
66
github.com/jessevdk/go-flags v1.5.0

0 commit comments

Comments
 (0)