Skip to content

Commit

Permalink
goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
dsokolyuk committed Feb 25, 2024
1 parent 7096204 commit 21c3dd3
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/build.yml
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 }}

0 comments on commit 21c3dd3

Please sign in to comment.