From 13e1ce5d86fbe8b5e357cda05fd859ebeb36cadd Mon Sep 17 00:00:00 2001 From: Eric Rakestraw Date: Fri, 4 Dec 2026 15:01:59 +0000 Subject: [PATCH] Make local release delivery the standard workflow --- .woodpecker/release.yml | 55 ----------------------------------------- docs/oss/attribution.md | 3 +-- docs/policy/release.md | 6 ++--- docs/release.md | 19 ++++++++------ 4 files changed, 16 insertions(+), 67 deletions(-) delete mode 100644 .woodpecker/release.yml diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml deleted file mode 100644 index 2cd9d543..00000000 --- a/.woodpecker/release.yml +++ /dev/null @@ -1,55 +0,0 @@ -matrix: - include: - - GO_IMAGE: golang:1.27.0 - -when: - - event: tag - ref: refs/tags/v* - -steps: - - name: deliver - image: ${GO_IMAGE} - environment: - RELEASEKIT_GITEA_TOKEN: - from_secret: releasekit_gitea_token - commands: - - | - set -eu - test -n "$${CI_COMMIT_TAG}" - test -n "$${CI_COMMIT_SHA}" - git check-ref-format "refs/tags/$${CI_COMMIT_TAG}" - git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}" - tag_commit=$(git rev-parse --verify "refs/tags/$${CI_COMMIT_TAG}^{commit}") - expected_commit=$(git rev-parse --verify "$${CI_COMMIT_SHA}^{commit}") - if [ "$${tag_commit}" != "$${expected_commit}" ]; then - printf 'Tag %s resolves to commit %s; event %s resolves to commit %s\n' \ - "$${CI_COMMIT_TAG}" "$${tag_commit}" "$${CI_COMMIT_SHA}" "$${expected_commit}" >&2 - exit 1 - fi - git checkout --detach "$${tag_commit}" - test "$(git rev-parse HEAD | tr '[:upper:]' '[:lower:]')" = "$${expected_commit}" - test -z "$(git status --porcelain --untracked-files=all)" - - bootstrap_dir=$(mktemp -d "$${CI_WORKSPACE%/*}/.releasekit-bootstrap.XXXXXX") - trap 'rm -rf "$${bootstrap_dir}"' EXIT - cp go.mod "$${bootstrap_dir}/releasekit.mod" - if [ -f go.sum ]; then - cp go.sum "$${bootstrap_dir}/releasekit.sum" - else - : > "$${bootstrap_dir}/releasekit.sum" - fi - - export GOWORK=off - export GOTOOLCHAIN=local - releasekit_host_os=$(go env GOHOSTOS) || exit $? - releasekit_host_arch=$(go env GOHOSTARCH) || exit $? - export GOOS="$${releasekit_host_os}" GOARCH="$${releasekit_host_arch}" - releasekit_module=go.maximumdirect.net/releasekit - go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -m "$${releasekit_module}" - go mod edit -modfile="$${bootstrap_dir}/releasekit.mod" -tool="$${releasekit_module}/cmd/releasekit" - go list -mod=mod -modfile="$${bootstrap_dir}/releasekit.mod" -deps "$${releasekit_module}/cmd/releasekit" > /dev/null - go tool -modfile="$${bootstrap_dir}/releasekit.mod" "$${releasekit_module}/cmd/releasekit" ci-deliver \ - --repo "$${CI_WORKSPACE}" \ - --prepared \ - --commit "$${expected_commit}" \ - "$${CI_COMMIT_TAG}" diff --git a/docs/oss/attribution.md b/docs/oss/attribution.md index 99f61146..4424f111 100644 --- a/docs/oss/attribution.md +++ b/docs/oss/attribution.md @@ -41,8 +41,7 @@ License and notices: [CC BY-SA 4.0](licenses/CC-BY-SA-4.0.txt) | ## ReleaseKit Selected module: `go.maximumdirect.net/releasekit` at `v0.10.0`. -Material: `scripts/releasekit` and `.woodpecker/release.yml`, adapted from the -adoption guide and tag-delivery example. +Material: `scripts/releasekit`, adapted from the adoption guide. Copyright (C) 2026 Eric Rakestraw diff --git a/docs/policy/release.md b/docs/policy/release.md index 590f2fdc..2d8c2c94 100644 --- a/docs/policy/release.md +++ b/docs/policy/release.md @@ -2,7 +2,7 @@ **Base Policy Version:** 1.7 -**Last Updated**: 2026-11-24 +**Last Updated**: 2026-12-04 **Upstream Source**: https://gitea.maximumdirect.net/eric/policy/src/commit/593c9b52273c5c879785ae9e995d21026df467b4/docs/policy/release.md @@ -42,8 +42,8 @@ separate remote read-back gate. Deliver the checked-in note as a hosted release page with the selected Linux/amd64 binary and native checksum assets. Delivery is required but has a -separate outcome from source publication; it may run asynchronously in tag CI -or locally from the matching tagged source. Signing and additional packaging +separate outcome from source publication. The standard workflow delivers locally +from the matching tagged source. Signing and additional packaging are not part of the current release workflow. ## Versioning And Compatibility diff --git a/docs/release.md b/docs/release.md index bb32103a..045950e2 100644 --- a/docs/release.md +++ b/docs/release.md @@ -12,8 +12,9 @@ the selected toolchain and dependencies separately from offline validation: ```sh export GOTOOLCHAIN=go1.27.0 +export GOWORK=off go version -GOWORK=off go mod download +go mod download ``` Choose an unused stable version under the policy's compatibility rules. Add @@ -34,7 +35,7 @@ ReleaseKit: git push origin main ``` -## Publish and deliver +## Publish source From the clean candidate on `main`, run: @@ -48,19 +49,23 @@ completes the source release; it does not wait for delivery. The optional `./scripts/releasekit check VERSION` is a diagnostic, not a mandatory preliminary repetition. -Tag CI uses the committed profile to deliver the note and binary/checksum assets. -Provision Woodpecker secret `releasekit_gitea_token` and its Git/module access -before relying on this route. Alternatively, from a clean checkout of the -matching tag with dependencies prepared, run: +## Deliver locally + +After successful source publication, deliver the hosted note, Linux/amd64 binary, +and checksum assets from the same clean checkout, while `HEAD` still identifies +the published tag's commit: ```sh ./scripts/releasekit deliver vMAJOR.MINOR.PATCH ``` -Use one delivery route as appropriate, not both routinely. Local delivery uses +Local delivery is the standard workflow; no CI job performs delivery. It uses the ignored `.releasekit/gitea-token` file or a nonblank `RELEASEKIT_GITEA_TOKEN` environment override. Keep the file owner-only and never display its contents. Git publication uses Git credentials, not this token. +When resuming delivery later, use a clean checkout of the matching tag and prepare +the toolchain and dependencies as above. Delivery does not repeat the publication +test suite or publish another tag. See the [delivery guide](https://forge.maximumdirect.net/base-layer/releasekit/src/tag/v0.10.0/docs/consumers/delivery.md) for credential setup and delivery details.