---
description: Test, lint, and release workflows; semver and GoReleaser
globs: ".github/**/*.yml,Makefile,.goreleaser.yml"
alwaysApply: false
---

# CI and Release

- **test.yml**: Runs on push to `main`/`release-*` and on PRs. Path filter for `**.go`, `go.*`, `Makefile`, workflow file. Jobs: `make test-all`, `make check-fmt`. Do not remove path filter or break job dependencies.
- **lint.yml**: Runs on PRs. Path filter for Go and config. Uses golangci-lint. Keep version and filters consistent.
- **integration.yml**: Runs Neptune plan/apply on PRs with real GitHub and MinIO. Needs `statuses: write` so Neptune can set commit statuses (neptune plan / neptune apply).
- **labeler.yml**: On pull_request; runs actions/labeler with `.github/labeler.yml` (path-based and head-branch rules for release-note categories).
- **label-old-prs.yml**: workflow_dispatch; backfills labels on existing PRs (state and limit inputs). Applies same rules as labeler to head branch and PR title in a separate step (labeler has no branch context on workflow_dispatch), then runs the labeler for path-based labels.
- **release.yml**: Triggers on push of tags `v*.*.*`. Uses GoReleaser; needs `contents: write`. Do not change tag pattern or permissions without good reason.
- **Semver**: Tags are `vMAJOR.MINOR.PATCH` (e.g. `v0.2.0`). GoReleaser reads tag and injects version/commit/date via ldflags in `main.go`.
- **.goreleaser.yml**: Builds `neptune` binary from `.` (multi-OS/arch) and Lambda `neptune-webhook` from `lambda/` (linux/amd64, released as `neptune-webhook.zip` and raw binary). Asset names are lowercase (e.g. `neptune_linux_amd64.tar.gz`). With `changelog.use: github-native`, the release body is generated by GitHub; categories are defined in `.github/release.yml` and depend on PR labels. Release footer has Full Changelog link. Keep Lambda binary name and CloudFormation Handler in sync; do not remove ldflags or rename binaries without updating docs.
- **Breaking changes in changelog**: For release notes, tag PRs with the `breaking-change` label so they appear under "Breaking Changes". Commit subject `!:` (e.g. `feat!: ...`, `fix(scope)!: ...`) is still recommended for semver.
