CI/CD & Releases
GitHub Actions Workflows
Section titled “GitHub Actions Workflows”Release Workflow
Section titled “Release Workflow”File: .github/workflows/release.yml
Trigger: Tag push matching v* (e.g., v0.6.1)
git tag v0.6.1git push origin v0.6.1This triggers:
-
GoReleaser builds binaries for 6 platforms:
linux/amd64,linux/arm64darwin/amd64,darwin/arm64windows/amd64,windows/arm64
-
Archives created as
.tar.gz(Linux/macOS) and.zip(Windows) -
Checksums file with SHA256 hashes
-
Docker images built and pushed to
ghcr.io/jmrplens/portainer-mcp-enhanced:- Multi-arch manifest (
latest+ version tag) - Based on Alpine Linux
- Multi-arch manifest (
-
GitHub Release created with changelog and all artifacts
Documentation Workflow
Section titled “Documentation Workflow”File: .github/workflows/deploy-docs.yml
Trigger: Push to main that modifies docs/ directory
Steps:
- Checkout code
- Install pnpm
- Install Node.js dependencies
- Build Starlight site (
pnpm run build) - Deploy to GitHub Pages
GoReleaser Configuration
Section titled “GoReleaser Configuration”Key sections in .goreleaser.yaml:
Builds
Section titled “Builds”builds: - main: ./cmd/portainer-mcp-enhanced binary: portainer-mcp-enhanced env: - CGO_ENABLED=0 goos: [linux, darwin, windows] goarch: [amd64, arm64] ldflags: - -s -w - -X main.Version={{.Version}} - -X main.Commit={{.ShortCommit}} - -X main.BuildDate={{.Date}}Docker
Section titled “Docker”dockers: - image_templates: - "ghcr.io/jmrplens/portainer-mcp-enhanced:{{ .Tag }}-amd64" goarch: amd64 dockerfile: Dockerfile.goreleaser - image_templates: - "ghcr.io/jmrplens/portainer-mcp-enhanced:{{ .Tag }}-arm64" goarch: arm64 dockerfile: Dockerfile.goreleaser
docker_manifests: - name_template: "ghcr.io/jmrplens/portainer-mcp-enhanced:{{ .Tag }}" image_templates: - "ghcr.io/jmrplens/portainer-mcp-enhanced:{{ .Tag }}-amd64" - "ghcr.io/jmrplens/portainer-mcp-enhanced:{{ .Tag }}-arm64"Homebrew
Section titled “Homebrew”Note: Homebrew tap distribution is not currently available for this fork. Use one of the other installation methods (Go install, Docker, or binary download).
Creating a Release
Section titled “Creating a Release”# 1. Ensure you're on main and up-to-dategit checkout maingit pull origin main
# 2. Run all testsmake test-all
# 3. Create and push the taggit tag v0.6.1git push origin v0.6.1
# 4. Monitor the release workflow# Go to Actions tab on GitHubVersion Scheme
Section titled “Version Scheme”The project uses Semantic Versioning:
- Major (
v1.0.0): Breaking API changes (tool removal, parameter changes) - Minor (
v0.7.0): New tools, features, Portainer version support - Patch (
v0.6.1): Bug fixes, documentation improvements
Changelog
Section titled “Changelog”GoReleaser auto-generates the changelog from commit messages since the last tag. Use Conventional Commits for clean changelogs:
| Prefix | Section in Changelog |
|---|---|
feat: | Features |
fix: | Bug Fixes |
docs: | (filtered out) |
test: | (filtered out) |
refactor: | (filtered out) |
Local Testing of Releases
Section titled “Local Testing of Releases”Test GoReleaser locally without publishing:
# Install GoReleaserbrew install goreleaser
# Dry-run (no publish)goreleaser release --snapshot --clean
# Check build artifactsls dist/Docker Images
Section titled “Docker Images”Build Locally
Section titled “Build Locally”# Standard Dockerfile (full build)docker build -t portainer-mcp .
# GoReleaser Dockerfile (pre-built binary)# Used by CI — expects binary at build context rootRun from Registry
Section titled “Run from Registry”docker run --rm \ ghcr.io/jmrplens/portainer-mcp-enhanced:latest \ -server https://portainer:9443 \ -token ptr_your_api_token