<!-- Provide a brief summary of your changes --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> The following PR introduces Goreleaser for the releases of the registry server and the publisher CLI. **Details:** - Builds registry and publisher binaries for Linux, macOS, and Windows (amd64 + arm64) - Leverage GitHub's release process by creating releases directly from GitHub's interface - Added .goreleaser.yaml configuration - New .github/workflows/release.yml workflow triggered by GitHub releases - Updated Docker tagging in deploy workflow (:latest and :semver(the tag) for releases, :main-YYYYMMDD-sha for testing/development) - Consolidated version handling in main.go files - Added release documentation ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> Locally (but we have to test it by creating a release, i.e. v0.0.1 once this gets merged) ## Breaking Changes <!-- Will users need to update their code or configurations? --> Yes, the notion of `latest` for the container image is now different ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] My code follows the repository's style guidelines - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions --> Related to #358 --------- Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
121 lines
No EOL
2.8 KiB
YAML
121 lines
No EOL
2.8 KiB
YAML
# GoReleaser configuration for MCP Registry
|
|
version: 2
|
|
|
|
# Build configuration
|
|
builds:
|
|
# Registry server binary
|
|
- id: registry
|
|
binary: registry
|
|
main: ./cmd/registry
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
- -s -w
|
|
- -X main.Version={{.Version}}
|
|
- -X main.GitCommit={{.FullCommit}}
|
|
- -X main.BuildTime={{.Date}}
|
|
|
|
# Publisher CLI tool binary
|
|
- id: publisher
|
|
binary: mcp-publisher
|
|
main: ./cmd/publisher
|
|
env:
|
|
- CGO_ENABLED=0
|
|
goos:
|
|
- linux
|
|
- darwin
|
|
- windows
|
|
goarch:
|
|
- amd64
|
|
- arm64
|
|
ldflags:
|
|
- -s -w
|
|
- -X main.Version={{.Version}}
|
|
- -X main.GitCommit={{.FullCommit}}
|
|
- -X main.BuildTime={{.Date}}
|
|
|
|
# This section defines whether we want to release the source code too.
|
|
source:
|
|
enabled: true
|
|
|
|
# This section defines how to generate the changelog
|
|
changelog:
|
|
sort: asc
|
|
use: github
|
|
filters:
|
|
exclude:
|
|
- '^docs:'
|
|
- '^test:'
|
|
- '^ci:'
|
|
- '^chore:'
|
|
- '^style:'
|
|
- 'merge conflict'
|
|
- 'Merge pull request'
|
|
- 'Merge remote-tracking branch'
|
|
- 'Merge branch'
|
|
groups:
|
|
- title: 'New Features'
|
|
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
|
|
order: 0
|
|
- title: 'Bug Fixes'
|
|
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
|
|
order: 1
|
|
- title: 'Performance Improvements'
|
|
regexp: '^.*?perf(\([[:word:]]+\))??!?:.+$'
|
|
order: 2
|
|
- title: 'Refactors'
|
|
regexp: '^.*?refactor(\([[:word:]]+\))??!?:.+$'
|
|
order: 3
|
|
- title: 'Documentation'
|
|
regexp: '^.*?docs?(\([[:word:]]+\))??!?:.+$'
|
|
order: 4
|
|
- title: 'Other Changes'
|
|
order: 999
|
|
|
|
# This section defines for which artifact types to generate SBOMs.
|
|
sboms:
|
|
- artifacts: archive
|
|
|
|
# This section defines the release policy.
|
|
release:
|
|
github:
|
|
owner: modelcontextprotocol
|
|
name: registry
|
|
|
|
# This section defines how and which artifacts we want to sign for the release.
|
|
signs:
|
|
- id: archives
|
|
cmd: cosign
|
|
args:
|
|
- "sign-blob"
|
|
- "--output-signature=${signature}"
|
|
- "--output-certificate=${certificate}"
|
|
- "${artifact}"
|
|
- "--yes" # needed on cosign 2.0.0+
|
|
artifacts: archive
|
|
output: true
|
|
certificate: '{{ trimsuffix (trimsuffix .Env.artifact ".zip") ".tar.gz" }}.pem'
|
|
|
|
# Also sign checksums file for additional verification
|
|
- id: checksums
|
|
cmd: cosign
|
|
args:
|
|
- "sign-blob"
|
|
- "--output-signature=${signature}"
|
|
- "--output-certificate=${certificate}"
|
|
- "${artifact}"
|
|
- "--yes"
|
|
artifacts: checksum
|
|
output: true
|
|
certificate: '{{ trimsuffix .Env.artifact ".txt" }}.pem'
|
|
|
|
# This section defines the release format.
|
|
archives:
|
|
- name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" |