fix: linting issues #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: write | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: latest | |
| build: | |
| name: Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: go test -race -coverprofile=coverage.txt -covermode=atomic ./... | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' && github.event_name == 'push' | |
| needs: [lint, build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.24" | |
| - name: Build binaries | |
| run: | | |
| GOOS=darwin GOARCH=arm64 go build -o claudewatch-darwin-arm64 . | |
| GOOS=darwin GOARCH=amd64 go build -o claudewatch-darwin-amd64 . | |
| GOOS=linux GOARCH=amd64 go build -o claudewatch-linux-amd64 . | |
| - name: Update latest tag | |
| run: | | |
| git tag -f latest | |
| git push -f origin latest | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: latest | |
| name: Latest | |
| body: Auto-built from main branch | |
| files: | | |
| claudewatch-darwin-arm64 | |
| claudewatch-darwin-amd64 | |
| claudewatch-linux-amd64 | |
| prerelease: false |