Upgrade github actions versions to latest and update deprecated options (#1319)

Co-authored-by: M. Mert Yildiran <me@mertyildiran.com>
This commit is contained in:
Christopher Redwine 2023-03-19 12:20:47 -05:00 committed by GitHub
parent 9b66600602
commit b05dbed71e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 18 deletions

View File

@ -16,16 +16,18 @@ jobs:
name: Golint name: Golint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - name: Checkout
uses: actions/checkout@v3
with: with:
fetch-depth: 2 fetch-depth: 2
- uses: actions/setup-go@v2 - name: Set up Go
uses: actions/setup-go@v4
with: with:
go-version: '^1.17' go-version-file: 'go.mod'
- name: Go lint - name: Go lint
uses: golangci/golangci-lint-action@v2 uses: golangci/golangci-lint-action@v3
with: with:
version: latest version: latest
args: --timeout=10m args: --timeout=10m

View File

@ -14,13 +14,13 @@ jobs:
name: Build and publish a new release name: Build and publish a new release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Set up Go 1.17 - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v4
with: with:
go-version: '1.17' go-version-file: 'go.mod'
- name: Check out the repo - name: Check out the repo
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Version - name: Version
id: version id: version
@ -55,7 +55,7 @@ jobs:
needs: [release] needs: [release]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
@ -73,16 +73,16 @@ jobs:
run: git fetch --force --tags run: git fetch --force --tags
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v4
with: with:
go-version: 1.17 go-version-file: 'go.mod'
- name: Run GoReleaser - name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2 uses: goreleaser/goreleaser-action@v4
with: with:
distribution: goreleaser distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }} version: ${{ env.GITHUB_REF_NAME }}
args: release --rm-dist args: release --clean
env: env:
GITHUB_TOKEN: ${{ secrets.HOMEBREW_TOKEN }} GITHUB_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
VER: ${{ steps.version.outputs.tag }} VER: ${{ steps.version.outputs.tag }}

View File

@ -15,17 +15,17 @@ jobs:
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- name: Check out code into the Go module directory - name: Check out code into the Go module directory
uses: actions/checkout@v2 uses: actions/checkout@v3
with: with:
fetch-depth: 2 fetch-depth: 2
- name: Set up Go 1.17 - name: Set up Go
uses: actions/setup-go@v2 uses: actions/setup-go@v4
with: with:
go-version: '^1.17' go-version-file: 'go.mod'
- name: Test - name: Test
run: make test run: make test
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3