-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1802090
commit 41b13e6
Showing
48 changed files
with
1,035 additions
and
689 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,19 +5,19 @@ on: | |
push: | ||
branches: | ||
- main | ||
tags: | ||
- v* | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: read-all | ||
permissions: {} | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ${{ matrix.os }} | ||
permissions: | ||
contents: read | ||
strategy: | ||
matrix: | ||
os: | ||
|
@@ -36,10 +36,14 @@ jobs: | |
|
||
- name: Run Tests | ||
run: go test -race ./... | ||
env: | ||
NO_COLOR: true | ||
|
||
cov: | ||
name: CodeCov | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Code | ||
|
@@ -52,16 +56,19 @@ jobs: | |
|
||
- name: Run Tests | ||
run: go test -race -cover -covermode=atomic -coverprofile=./coverage.out ./... | ||
env: | ||
NO_COLOR: true | ||
|
||
- name: Coverage | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
files: ./coverage.out | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Code | ||
|
@@ -72,46 +79,41 @@ jobs: | |
with: | ||
go-version-file: go.mod | ||
|
||
- name: Clean Mod Cache # See https://github.com/golangci/golangci-lint-action/issues/135 | ||
run: go clean -modcache | ||
|
||
- name: Run Linting | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: latest | ||
|
||
release: | ||
name: Release | ||
vulncheck: | ||
name: Vulncheck | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
|
||
needs: | ||
- test | ||
- cov | ||
- lint | ||
|
||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | ||
contents: read | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
fetch-depth: 0 | ||
go-version-file: go.mod | ||
|
||
- name: Install govulncheck | ||
run: go install golang.org/x/vuln/cmd/govulncheck@latest | ||
|
||
- name: Fetch Existing Tags | ||
run: git fetch --force --tags | ||
- name: Run govulncheck | ||
run: govulncheck ./... | ||
|
||
- name: Parse Release Version | ||
id: version | ||
run: | | ||
VERSION=${GITHUB_REF#refs/tags/v} | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
typos: | ||
name: Typos | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
- name: Publish Draft Release | ||
uses: release-drafter/release-drafter@v6 | ||
with: | ||
version: ${{ steps.version.outputs.version }} | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check for Typos | ||
uses: crate-ci/[email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: read | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Fetch Existing Tags | ||
run: git fetch --force --tags | ||
|
||
- name: Parse Release Version | ||
id: version | ||
run: | | ||
VERSION=${GITHUB_REF#refs/tags/v} | ||
echo "version=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Publish Draft Release | ||
uses: release-drafter/release-drafter@v6 | ||
with: | ||
version: ${{ steps.version.outputs.version }} | ||
publish: true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
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
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
Oops, something went wrong.