-
Notifications
You must be signed in to change notification settings - Fork 3
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
dsokolyuk
committed
Feb 25, 2024
1 parent
7096204
commit 21c3dd3
Showing
1 changed file
with
13 additions
and
12 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 |
---|---|---|
@@ -1,31 +1,32 @@ | ||
name: build | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
# run only against tags | ||
tags: | ||
- 'v*' | ||
pull_request: | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-go@v2 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
cache: true | ||
go-version: stable | ||
- run: sudo apt-get install -y libpcap-dev | ||
- run: go mod tidy | ||
- run: go test -v ./... | ||
- uses: goreleaser/goreleaser-action@v2 | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |