chore(deps): bump codecov/codecov-action in the dependencies group #792
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Test and Publish | |
on: | |
merge_group: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
cache-dependency-path: "./go.sum" | |
check-latest: true | |
go-version: ">=1.22.2" | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -race -coverprofile=coverage.txt -covermode=atomic -v ./... | |
- name: Install govulncheck | |
run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
- name: Run govulncheck | |
run: govulncheck ./... | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1 | |
continue-on-error: true | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: openfga/go-sdk | |
create-release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: [test] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1 | |
with: | |
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |