Files
node-lookup/.woodpecker/release.yaml
T
unkinben b9612ba1c6 feat: include OS and arch in release binary name
Binary is now named node-lookup-linux-amd64 to match the target
platform of the golang:latest build container.

💘 Generated with Crush

Assisted-by: Claude Sonnet 4.6 via Crush <crush@charm.land>
2026-03-26 14:58:26 +11:00

39 lines
1.4 KiB
YAML

when:
- event: release
steps:
- name: test
image: golang:latest
commands:
- go test ./...
- name: build
image: golang:latest
commands:
- VERSION=${CI_COMMIT_TAG}
- BINARY=node-lookup-linux-amd64
- go build -ldflags="-s -w -X main.version=${VERSION}" -o ${BINARY} ./...
depends_on: [test]
- name: release
image: git.unkin.net/unkin/almalinux9-base:20260325
environment:
RELEASER_TOKEN:
from_secret: RELEASER_TOKEN
commands:
- |
curl --output /usr/local/bin/tea https://artifactapi.k8s.syd1.au.unkin.net/api/v1/remote/gitea-dl/tea/0.12.0/tea-0.12.0-linux-amd64 && chmod +x /usr/local/bin/tea
tea logins add --name gitea --url https://git.unkin.net --token "$${RELEASER_TOKEN}" --no-version-check
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$PREV_TAG" ]; then
NOTES=$(git log "${PREV_TAG}..${CI_COMMIT_TAG}" --merges --pretty=format:"- %s")
else
NOTES=$(git log --merges --pretty=format:"- %s")
fi
tea releases edit "${CI_COMMIT_TAG}" --note "${NOTES}" --login gitea --repo "${CI_REPO}"
tea releases assets create "${CI_COMMIT_TAG}" node-lookup-linux-amd64 --login gitea --repo "${CI_REPO}"
backend_options:
kubernetes:
serviceAccountName: default
depends_on: [build]