Skip to content

Commit

Permalink
Add CI/CD GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MShekow committed Dec 21, 2022
1 parent 14cd368 commit caa90e2
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: ContinuousDelivery
on:
push:
tags:
- 'v*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Continuous Integration
on: [ push, pull_request ]

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3

- name: Verify dependencies
run: go mod verify

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

- name: Run go vet
run: go vet ./...

- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...

- name: Run tests
run: go test -race -vet=off ./...

0 comments on commit caa90e2

Please sign in to comment.