Skip to content

CI/CD & Releases

File: .github/workflows/release.yml Trigger: Tag push matching v* (e.g., v0.6.1)

git tag v0.6.1
git push origin v0.6.1

This triggers:

  1. GoReleaser builds binaries for 6 platforms:

    • linux/amd64, linux/arm64
    • darwin/amd64, darwin/arm64
    • windows/amd64, windows/arm64
  2. Archives created as .tar.gz (Linux/macOS) and .zip (Windows)

  3. Checksums file with SHA256 hashes

  4. Docker images built and pushed to ghcr.io/jmrplens/portainer-mcp-enhanced:

    • Multi-arch manifest (latest + version tag)
    • Based on Alpine Linux
  5. GitHub Release created with changelog and all artifacts

File: .github/workflows/deploy-docs.yml Trigger: Push to main that modifies docs/ directory

Steps:

  1. Checkout code
  2. Install pnpm
  3. Install Node.js dependencies
  4. Build Starlight site (pnpm run build)
  5. Deploy to GitHub Pages

Key sections in .goreleaser.yaml:

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}}
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"

Note: Homebrew tap distribution is not currently available for this fork. Use one of the other installation methods (Go install, Docker, or binary download).

Terminal window
# 1. Ensure you're on main and up-to-date
git checkout main
git pull origin main
# 2. Run all tests
make test-all
# 3. Create and push the tag
git tag v0.6.1
git push origin v0.6.1
# 4. Monitor the release workflow
# Go to Actions tab on GitHub

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

GoReleaser auto-generates the changelog from commit messages since the last tag. Use Conventional Commits for clean changelogs:

PrefixSection in Changelog
feat:Features
fix:Bug Fixes
docs:(filtered out)
test:(filtered out)
refactor:(filtered out)

Test GoReleaser locally without publishing:

Terminal window
# Install GoReleaser
brew install goreleaser
# Dry-run (no publish)
goreleaser release --snapshot --clean
# Check build artifacts
ls dist/
Terminal window
# Standard Dockerfile (full build)
docker build -t portainer-mcp .
# GoReleaser Dockerfile (pre-built binary)
# Used by CI — expects binary at build context root
Terminal window
docker run --rm \
ghcr.io/jmrplens/portainer-mcp-enhanced:latest \
-server https://portainer:9443 \
-token ptr_your_api_token