Skip to content

Commit

Permalink
added github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed May 1, 2022
1 parent e10a8d0 commit 33ff259
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Go

on:
pull_request:
push:

jobs:

build:
runs-on: ubuntu-latest
steps:
- name: shallow clone
uses: actions/checkout@v2
if: "!startsWith(github.ref, 'refs/tags/')"

- name: deep clone
uses: actions/checkout@v2
if: startsWith(github.ref, 'refs/tags/')
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

0 comments on commit 33ff259

Please sign in to comment.