Skip to content

Commit

Permalink
chore: add GitHub Actions for test and build
Browse files Browse the repository at this point in the history
  • Loading branch information
macrat committed Apr 17, 2021
1 parent 397b64a commit 6043825
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: release

on:
push:
tags:
- "v[0-9]+\.[0-9]+\.[0-9]+"

jobs:
release:
name: release
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Test
run: go test -cover ./...
- uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: test

on:
push:
branches: [main]
pull_request:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
with:
go-version: 1.16.x
- uses: actions/checkout@v2
- name: Test
run: go test -cover ./...

analyze:
name: CodeQL
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: github/codeql-action/init@v1
with:
languages: go
- uses: github/codeql-action/analyze@v1

0 comments on commit 6043825

Please sign in to comment.