Skip to content

ci: add CI/release workflow #11

ci: add CI/release workflow

ci: add CI/release workflow #11

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: Jerome1337/gofmt-action@v1.0.5
with:
gofmt-flags: '-l -d'
- uses: actions/setup-go@v3
with:
go-version: 1.21
- uses: golangci/golangci-lint-action@v3
test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.21
- run: go test -v ./...
release:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.21
- uses: go-semantic-release/action@v1
with:
prerelease: true
hooks: goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}