mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-06-29 03:12:54 +00:00
fix: enable binary builds for proper GitHub releases and Helm charts
Problem: - With builds: skip: true, no artifacts were created - GoReleaser wasn't creating GitHub releases or tags - Helm chart workflow wasn't triggered (depends on tags) - No downloadable binaries for users Solution: - Enabled builds for both gohoarder and migrate binaries - CGO_ENABLED=1 for SQLite support - Added fts5 tag for full-text search - Builds run natively per platform in split/merge workflow: - darwin/arm64 (Apple Silicon Macs) - linux/amd64 (x86_64 Linux) - linux/arm64 (ARM64 Linux) - Ignored darwin/amd64 (Intel Macs) to limit build matrix How it works: 1. Split phase: Each platform builds natively (no cross-compilation) 2. Merge phase: Combines all artifacts, creates release, builds Docker images 3. Docker images still use multi-stage builds (independent of binaries) 4. GitHub release created with tags 5. Helm chart workflow triggered Benefits: - Downloadable binaries for all platforms - Archives created automatically - GitHub releases with proper tags - Helm charts published - Docker images built separately with multi-stage builds
This commit is contained in:
+47
-4
@@ -13,13 +13,56 @@ before:
|
|||||||
# - ./script/generate-version.sh
|
# - ./script/generate-version.sh
|
||||||
|
|
||||||
# Build configuration
|
# Build configuration
|
||||||
# Note: Binaries are built inside Docker containers (multi-stage builds)
|
# Builds run natively per-platform in split mode (no CGO cross-compilation)
|
||||||
# to avoid CGO cross-compilation issues. No standalone builds here.
|
# Docker images also use multi-stage builds independently
|
||||||
builds:
|
builds:
|
||||||
- id: gohoarder
|
- id: gohoarder
|
||||||
skip: true
|
main: ./cmd/gohoarder
|
||||||
|
binary: gohoarder
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
tags:
|
||||||
|
- fts5
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- -s -w
|
||||||
|
- -X github.com/lukaszraczylo/gohoarder/internal/version.Version={{.Version}}
|
||||||
|
- -X github.com/lukaszraczylo/gohoarder/internal/version.GitCommit={{.ShortCommit}}
|
||||||
|
- -X github.com/lukaszraczylo/gohoarder/internal/version.BuildTime={{.Date}}
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
ignore:
|
||||||
|
- goos: darwin
|
||||||
|
goarch: amd64
|
||||||
|
|
||||||
- id: migrate
|
- id: migrate
|
||||||
skip: true
|
main: ./cmd/migrate
|
||||||
|
binary: migrate
|
||||||
|
env:
|
||||||
|
- CGO_ENABLED=1
|
||||||
|
tags:
|
||||||
|
- fts5
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
|
ldflags:
|
||||||
|
- -s -w
|
||||||
|
- -X main.Version={{.Version}}
|
||||||
|
- -X main.GitCommit={{.ShortCommit}}
|
||||||
|
- -X main.BuildTime={{.Date}}
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- darwin
|
||||||
|
goarch:
|
||||||
|
- amd64
|
||||||
|
- arm64
|
||||||
|
ignore:
|
||||||
|
- goos: darwin
|
||||||
|
goarch: amd64
|
||||||
|
|
||||||
# Archives for releases
|
# Archives for releases
|
||||||
archives:
|
archives:
|
||||||
|
|||||||
Reference in New Issue
Block a user