Added .github and goreleaser

This commit is contained in:
Medzik 2021-07-14 11:52:50 +02:00
parent 5bb3436eca
commit deca65708c
5 changed files with 86 additions and 1 deletions

14
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,14 @@
version: 2
updates:
# Maintain dependencies for Go modules
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

20
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: lint
on:
pull_request:
push:
jobs:
golangci:
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: GolangCi Lint
uses: golangci/golangci-lint-action@v2
with:
version: latest

27
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: goreleaser
on:
pull_request:
push:
permissions:
contents: write
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: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

4
.gitignore vendored
View File

@ -12,11 +12,13 @@
# Test binary, built with `go test -c`
*.test
# Output of the go coverage tool, specifically when used with LiteIDE
# Output binary
*.out
/pingbot*
# Sums
MD5SUM
SHA256SUM
VERSION
dist/

22
.goreleaser.yml Normal file
View File

@ -0,0 +1,22 @@
before:
hooks:
- go mod tidy
builds:
- goos:
- linux
goarch:
- amd64
archives:
- format: tar.gz
format_overrides:
- goos: windows
format: zip
files:
- none*
checksum:
name_template: 'checksums.txt'