Skip to content

Commit

Permalink
Merge pull request #42 from planetscale/gha/use-go.mod-version
Browse files Browse the repository at this point in the history
  • Loading branch information
joemiller authored Nov 26, 2023
2 parents b672779 + 26cec4f commit 67372f7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 18 deletions.
25 changes: 9 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- 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/checkout@v4

- 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,22 +57,20 @@ 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
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: fetch tags
run: git fetch --force --tags
fetch-tags: true

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

- name: install autotag binary
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/licensing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ jobs:
licensing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

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

- run: sudo gem install license_finder
- run: license_finder
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 67372f7

Please sign in to comment.