Skip to content

Commit

Permalink
Adds GH actions for testing + release
Browse files Browse the repository at this point in the history
  • Loading branch information
Gowiem committed Jun 20, 2020
1 parent ab9eff2 commit b4e8044
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Go Build & Test
on:
push:
branches:
- "master"
pull_request:
branches:
- "*"
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
name: Build & Test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2-beta
with:
go-version: "^1.14.0"
- run: go mod download
- name: Build & Test
run: |
go build -v .
go test ./...
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@master
with:
args: release --snapshot --skip-publish --rm-dist
22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release with goreleaser
on:
push:
tags:
- v*.*.*
jobs:
build:
runs-on: ubuntu-latest
name: goreleaser
steps:
- uses: actions/checkout@v2
- name: Unshallow Fetch
run: git fetch --prune --unshallow
- uses: actions/setup-go@v2-beta
with:
go-version: "^1.14.0"
- name: Release via goreleaser
uses: goreleaser/goreleaser-action@master
with:
args: release
env:
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}

0 comments on commit b4e8044

Please sign in to comment.