Skip to content

Merge pull request #3 from mondaycom/feat/goreleaser-homebrew-nix #6

Merge pull request #3 from mondaycom/feat/goreleaser-homebrew-nix

Merge pull request #3 from mondaycom/feat/goreleaser-homebrew-nix #6

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.26"]
steps:
- uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: ${{ matrix.go-version }}
- name: Check formatting
run: make fmt-check
- name: Vet
run: make vet
- name: Verify generated code is up to date
run: |
go generate ./...
git diff --exit-code internal/api/gen/
- name: Lint
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2
golangci-lint run ./...
- name: Test
run: make test
packaging:
name: Packaging config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v7
with:
go-version: "1.26"
# Catches deprecated or invalid goreleaser properties on a PR, rather than
# when a tag push turns them into a failed release.
- name: Validate goreleaser config
uses: goreleaser/goreleaser-action@v7
with:
version: "~> v2"
args: check
# Proves all four release targets still cross-compile without cgo.
- name: Build all release targets
uses: goreleaser/goreleaser-action@v7
with:
version: "~> v2"
args: build --snapshot --clean
nix:
name: Nix flake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: cachix/install-nix-action@v31
# Guards vendorHash, which goes stale whenever go.mod or go.sum changes.
# Nothing else would catch it: the Go build is unaffected, so the flake
# would stay broken until someone ran `nix run`. This also runs the test
# suite inside the Nix sandbox, which has no network.
- name: Build the flake
run: nix build .#mcli
- name: Smoke-test the built binary
run: ./result/bin/mcli version