-
Notifications
You must be signed in to change notification settings - Fork 4
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
Ryan Carter
committed
Apr 21, 2021
1 parent
4b88a15
commit 10ef4a9
Showing
6 changed files
with
74 additions
and
42 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16 | ||
- name: goreleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
dist/ |
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,44 @@ | ||
# This is an example .goreleaser.yml file with some sane defaults. | ||
# Make sure to check the documentation at http://goreleaser.com | ||
env: | ||
- GO111MODULE=on | ||
before: | ||
hooks: | ||
# You may remove this if you don't use go modules. | ||
- go mod tidy | ||
builds: | ||
- main: cmd/nftrace/main.go | ||
binary: nftrace | ||
env: | ||
- CGO_ENABLED=0 | ||
flags: | ||
- -v | ||
ldflags: | ||
- -X github.com/eiginn/nftrace.BuildVersion={{.Version}} | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
- arm64 | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
nfpms: | ||
- formats: [deb] | ||
package_name: "nftrace" | ||
section: "net" | ||
priority: "optional" | ||
maintainer: "Ryan Carter <[email protected]>" | ||
description: Easier tracing of packets through iptables | ||
homepage: "https://github.com/eiginn/nftrace" | ||
license: "MIT" | ||
dependencies: | ||
- iptables | ||
- libc6 (>= 2.26) |
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,10 +1,12 @@ | ||
VERSION := $(shell git describe --tags --always --dirty=-dev) | ||
export VERSION | ||
|
||
.PHONY: all build clean test | ||
all: build | ||
|
||
build: | ||
go build -mod vendor -v -o nftrace -ldflags="-X 'github.com/eiginn/nftrace.BuildVersion=$(VERSION)'" cmd/nftrace/main.go | ||
mkdir -p dist | ||
go build -mod vendor -v -o dist/nftrace -ldflags="-X 'github.com/eiginn/nftrace.BuildVersion=$(VERSION)'" cmd/nftrace/main.go | ||
|
||
clean: | ||
rm -f nftrace | ||
rm -rf dist |
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