Merge pull request #1 from baez90/add-github-ci

Add GitHub ci
This commit is contained in:
Peter 2020-04-09 00:47:36 +02:00 committed by GitHub
commit ca76e18b93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 71 additions and 1 deletions

34
.github/workflows/go-build.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Go
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.x
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Build & test
run: make
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist
key: ${{ secrets.YOUR_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

1
.gitignore vendored
View file

@ -15,3 +15,4 @@ main
############### ###############
.idea/ .idea/
dist/

35
.goreleaser.yml Normal file
View file

@ -0,0 +1,35 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- make plugins
builds:
- id: "default"
ldflags:
- -w -s
goos:
- linux
goarch:
- amd64
archives:
- id: default
builds:
- default
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
replacements:
amd64: x86_64
wrap_in_directory: true
files:
- config.yaml
- plugins/*.so
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'