task: name: Lint container: image: golangci/golangci-lint:latest cpu: 2 memory: 4096 prepare_script: - apt-get update - apt-get install -y libx11-dev lint_script: - golangci-lint run -v --output.json.path golangci.json always: report_artifacts: path: golangci.json type: text/json format: golangci task: name: Test (Linux) alias: Tests container: image: golang:latest prepare_script: - apt-get update - apt-get install -y libx11-dev test_script: go test -v ./... task: name: Test (macOS) alias: Tests macos_instance: image: ghcr.io/cirruslabs/macos-runner:sequoia prepare_script: brew install go test_script: go test -v ./... task: name: Check for lacking "buf generate" invocation container: image: golang:latest install_buf_script: go install github.com/bufbuild/buf/cmd/buf@v1.50.0 generate_script: buf generate check_script: git diff --exit-code task: only_if: $CIRRUS_BRANCH != '' && $CIRRUS_PR == '' && $CIRRUS_REPO_OWNER == 'cirruslabs' name: buf push container: image: bufbuild/buf login_script: echo "$BUF_TOKEN" | buf registry login --token-stdin push_script: buf push --git-metadata env: BUF_TOKEN: ENCRYPTED[!8ee7eb2504cc84b08d4a7c0dacbe103640b1feaa26d06f0df010784e872d39e65a0cdea3fc7c09b065a917a77113b96b!] task: name: Release (Dry Run) only_if: $CIRRUS_TAG == '' macos_instance: image: ghcr.io/cirruslabs/macos-runner:sequoia depends_on: - Lint - Tests install_script: - brew install go - brew install --cask goreleaser/tap/goreleaser-pro release_script: goreleaser release --clean --snapshot goreleaser_artifacts: path: "dist/**" task: name: Release only_if: $CIRRUS_TAG != '' macos_instance: image: ghcr.io/cirruslabs/macos-runner:sequoia depends_on: - Lint - Tests env: GITHUB_TOKEN: ENCRYPTED[!98ace8259c6024da912c14d5a3c5c6aac186890a8d4819fad78f3e0c41a4e0cd3a2537dd6e91493952fb056fa434be7c!] FURY_TOKEN: ENCRYPTED[!97fe4497d9aca60a3d64904883b81e21f19706c6aedda625c97f62f67ec46b8efa74c55699956158bbf0a23726e7d9f6!] GORELEASER_KEY: ENCRYPTED[!9b80b6ef684ceaf40edd4c7af93014ee156c8aba7e6e5795f41c482729887b5c31f36b651491d790f1f668670888d9fd!] install_script: - brew install go - brew install --cask goreleaser/tap/goreleaser-pro release_script: goreleaser