Commit graph

2 commits

Author SHA1 Message Date
Till Wegmueller
ea876be242
fix(ci): prevent invalid Docker tags for pre-release versions
Disable major and minor version tags for pre-release versions (alpha, beta, rc)
since semver pattern extraction doesn't work correctly with pre-release suffixes.

This fixes the error:
  ERROR: failed to build: invalid tag "ghcr.io/.../barycenter:-1171167"

Pre-release versions will now only get:
- Full version tag: v0.2.0-alpha.1
- SHA tag: main-<sha>

Stable releases will continue to get all tags:
- Full version: v1.0.0
- Major.minor: 1.0
- Major: 1
- SHA: main-<sha>

Also added missing id to build step for attestation.
2025-11-29 16:08:31 +01:00
Till Wegmueller
221406b1a2
ci: add automated release workflow with Docker image publishing
Add comprehensive release automation:

**GitHub Actions Release Workflow:**
- Triggers on version tags (v*.*.*)
- Builds multi-platform Docker images (amd64, arm64)
- Publishes to GitHub Container Registry (ghcr.io)
- Creates GitHub Releases with auto-generated changelogs
- Generates build provenance attestations for supply chain security
- Semantic versioning with tag variants (v1.0.0, 1.0, 1)

**cargo-release Configuration:**
- Automated version bumping in Cargo.toml
- Updates CHANGELOG.md with version and date
- Syncs Helm chart versions (Chart.yaml)
- Creates git tags and commits
- Pushes to remote automatically
- Enforces main branch releases

**Release Documentation:**
- RELEASE.md with complete release process guide
- CHANGELOG.md following Keep a Changelog format
- Updated README.md with deployment and release sections
- Instructions for patch, minor, and major releases
- Dry-run support for testing
- Hotfix and rollback procedures

**Usage:**
To create a release, simply run:
  cargo install cargo-release
  cargo release minor --execute

This will:
1. Bump version in all relevant files
2. Update changelog
3. Create git tag
4. Trigger Docker image build and publish
5. Create GitHub Release with notes

Docker images will be available at:
  ghcr.io/[owner]/barycenter:v1.0.0
  ghcr.io/[owner]/barycenter:1.0
  ghcr.io/[owner]/barycenter:1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 15:49:52 +01:00