diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91e850a..e6b8990 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 @@ -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: @@ -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: | diff --git a/.github/workflows/licensing.yaml b/.github/workflows/licensing.yaml index e530f8a..39ed6b8 100644 --- a/.github/workflows/licensing.yaml +++ b/.github/workflows/licensing.yaml @@ -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 diff --git a/go.mod b/go.mod index 87fd4b3..e17eff0 100644 --- a/go.mod +++ b/go.mod @@ -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