diff --git a/.github/workflows/build-publish.yml b/.github/workflows/build-publish.yml new file mode 100644 index 0000000..3e3e802 --- /dev/null +++ b/.github/workflows/build-publish.yml @@ -0,0 +1,30 @@ +name: Build and Publish +on: [push] +permissions: + contents: write +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: 1.23.x + - name: Build + run: go build + - name: Test + run: go test ./... -coverprofile=coverage.txt -covermode=count + - name: Code Quality Analysis + uses: golangci/golangci-lint-action@v6 + with: + version: v1.59 + - name: Release + if: startsWith(github.ref, 'refs/tags/') + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: v2.2.0 + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}