Merge pull request 'Build release binaries for linux only' (#5) from benvin/linux-only-release into main

Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
2026-10-23 22:43:43 +11:00
2 changed files with 9 additions and 10 deletions
+8 -9
View File
@@ -18,8 +18,8 @@ steps:
cpu: 2
# Build both binaries into dist/ (consumed by the RPM step) plus the
# cross-platform binaries attached to the Gitea release. Each tool is a
# separate main package, so they are built individually per os/arch.
# linux amd64/arm64 binaries attached to the Gitea release. Each tool is a
# separate main package, so they are built individually per arch.
- name: build
image: git.unkin.net/unkin/almalinux9-gobuilder:20260606
commands:
@@ -30,11 +30,10 @@ steps:
- |
for entry in "vcm:./vcm" "vctx:./vctx"; do
name="$${entry%%:*}"; pkg="$${entry##*:}"
for osarch in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64; do
os="$${osarch%/*}"; arch="$${osarch#*/}"
GOOS="$$os" GOARCH="$$arch" \
for arch in amd64 arm64; do
GOOS=linux GOARCH="$$arch" \
go build -ldflags="-s -w -X main.version=${CI_COMMIT_TAG}" \
-o "$${name}-$${os}-$${arch}" "$$pkg"
-o "$${name}-linux-$${arch}" "$$pkg"
done
done
depends_on: [test]
@@ -101,7 +100,7 @@ steps:
memory: 512Mi
cpu: 500m
# Cut a Gitea release with the cross-platform binaries attached.
# Cut a Gitea release with the linux amd64/arm64 binaries attached.
- name: release
image: git.unkin.net/unkin/almalinux9-base:20260606
environment:
@@ -131,11 +130,11 @@ steps:
NOTES=$$(git log --pretty=format:"- %s")
fi
tea releases create --tag "${CI_COMMIT_TAG}" --title "${CI_COMMIT_TAG}" --note "$${NOTES}" --login gitea --repo "${CI_REPO}"
# The build step writes the cross-compiled binaries into the workspace
# The build step writes the linux binaries into the workspace
# root; the package step writes the RPM to dist/. Generate a checksums
# manifest over everything we attach so downloads can be verified.
RPM=$$(ls dist/*.rpm 2>/dev/null | head -1)
ASSETS="vcm-linux-amd64 vcm-linux-arm64 vcm-darwin-amd64 vcm-darwin-arm64 vctx-linux-amd64 vctx-linux-arm64 vctx-darwin-amd64 vctx-darwin-arm64"
ASSETS="vcm-linux-amd64 vcm-linux-arm64 vctx-linux-amd64 vctx-linux-arm64"
[ -n "$$RPM" ] && ASSETS="$$ASSETS $$RPM"
sha256sum $$ASSETS > sha256sums.txt
tea releases assets create "${CI_COMMIT_TAG}" $$ASSETS sha256sums.txt \
+1 -1
View File
@@ -88,7 +88,7 @@ make patch # or: make minor / make major
```
which creates the next semver tag and pushes it. The release pipeline then
tests, cross-compiles both binaries (linux/darwin × amd64/arm64), builds an RPM
tests, builds both binaries for linux amd64/arm64, builds an RPM
(bundling shell completions), PUTs the RPM to the artifactapi local `rpm-internal`
yum repo, and cuts a Gitea release with the binaries + checksums attached.