Skip to content

Commit

Permalink
chore: add github release
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Apr 13, 2022
1 parent 05ab47c commit c01af77
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: "~1.16"
- run: go test -race ./...
go-version: "~1.18"
- run: go test -race -coverprofile=coverage.out ./...
build:
name: Build
runs-on: ${{ matrix.os }}
Expand All @@ -28,13 +30,24 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "~1.16"
go-version: "~1.18"
- run: go build
lint:
name: Lint
golangci-lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: golangci/golangci-lint-action@v2
with:
version: latest
semgrep:
name: semgrep
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: returntocorp/semgrep-action@v1
with:
config: >-
p/security-audit
p/secrets
p/golang
27 changes: 27 additions & 0 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: goreleaser

on:
push:
tags:
- "*"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: "~1.18"
- uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 20 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
before:
hooks:
- go mod tidy
builds:
- main: .
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
universal_binaries:
- replace: true
archives:
- format_overrides:
- goos: windows
format: zip
changelog:
skip: true

0 comments on commit c01af77

Please sign in to comment.