Skip to content

Commit

Permalink
build: add ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanchapai committed Mar 4, 2024
1 parent a4e4c5d commit 6b3d0a0
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- uses: golangci/golangci-lint-action@c67416616c29c3c48d26b59c45cadb56966d80aa
with:
args: --timeout=5m
test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21
- run: go test -v ./...
release:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.21
- uses: sumanchapai/go-semantic-release-action@v1
with:
pre-release-post-dry-cmd: "cp .version cmd/.version"
files-to-commit: "cmd/.version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6b3d0a0

Please sign in to comment.