-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: begin transition from circleci to gh actions and goreleaser
Build + test + vet all push/PR events. Pushing tags starting with 'v' will perform a draft release driven by GoReleaser. Fixes to allow vet to pass.
- Loading branch information
Showing
5 changed files
with
119 additions
and
92 deletions.
There are no files selected for viewing
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,51 @@ | ||
name: builder-releaser | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build-test-vet-release: | ||
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: Build | ||
run: go build -v ./... | ||
- | ||
name: Test | ||
run: go test -v ./... | ||
- | ||
name: Vet | ||
run: go vet -v ./... | ||
- | ||
if: startsWith(github.ref, 'refs/tags/v') == true | ||
name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v3 | ||
with: | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }} | ||
- | ||
if: startsWith(github.ref, 'refs/tags/v') == true | ||
name: GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
# either 'goreleaser' (default) or 'goreleaser-pro' | ||
distribution: goreleaser | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution | ||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} |
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,64 @@ | ||
builds: | ||
# You can have multiple builds defined as a yaml list. | ||
- | ||
goos: | ||
- linux | ||
- freebsd | ||
- darwin | ||
- windows | ||
# GOARCH to build for. | ||
# For more info refer to: https://golang.org/doc/install/source#environment | ||
# Defaults are 386, amd64 and arm64. | ||
goarch: | ||
- amd64 | ||
|
||
nfpms: | ||
# note that this is an array of nfpm configs | ||
- | ||
# Replacements for GOOS and GOARCH in the package name. | ||
# Keys should be valid GOOSs or GOARCHs. | ||
# Values are the respective replacements. | ||
# Default is empty. | ||
replacements: | ||
amd64: 64-bit | ||
darwin: macOS | ||
vendor: alphasoc | ||
homepage: https://alphasoc.com/ | ||
maintainer: AlphaSOC <[email protected]> | ||
description: A lightweight utility used to generate malicious network traffic and help | ||
security teams to evaluate security controls and network visibility. | ||
license: CCPL | ||
# Formats to be generated. | ||
formats: | ||
- deb | ||
- rpm | ||
- apk | ||
|
||
release: | ||
# If set to auto, will mark the release as not ready for production | ||
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1 | ||
# If set to true, will mark the release as not ready for production. | ||
# Default is false. | ||
prerelease: auto | ||
# If set to true, will not auto-publish the release. | ||
# Default is false. | ||
draft: true | ||
# Header template for the release body. | ||
header: | | ||
## Flightsim Release - {{ time "2006-02-01" }} | ||
Welcome to this new release! | ||
# Footer template for the release body. | ||
footer: | | ||
## Enjoy! | ||
Those were the changes on {{ .Tag }}! | ||
# You can change the name of the release. | ||
# Default is `{{.Tag}}` on OSS and `{{.PrefixedTag}}` on Pro. | ||
name_template: "{{.ProjectName}}-v{{.Version}}" | ||
|
||
# Sign all artifacts. | ||
signs: | ||
- artifacts: all |
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