ci: make Gitea the gate before GitHub and crates.io, and stop pushing every tag #13

Merged
chrnx merged 2 commits from hotfix/release-flow-ordering into main 2026-09-06 19:43:39 +00:00
Owner

Needed before tagging v26.9.0-beta.0, because it changes what tagging does.

The flow as described, and as it actually was

The intended sequence is: promote main, no release; tag on Gitea and let it
build the artifacts to confirm everything generates; then hand the tag to GitHub,
which publishes to crates.io.

Steps two and three were not sequential. promote.yml and release.yml both
triggered on the same v* push, so Gitea began building and pushed the tag to
GitHub in the same moment — and the tag arriving there is what starts GitHub's
build and its publish-crate. The local build could not gate anything: by the
time it could have failed, the crate was already on its way out, and crates.io
has no unpublish, only yank.

Tag promotion moves into release.yml as promote-tag, Gitea-only and behind
needs: build. Now the four targets build and every artifact the runners can
execute is executed, and only then does GitHub hear about the tag.

git push --tags has been failing on every push to main

Not new, and not caused by the recent work. The tags diverged between the forges:

tag Gitea GitHub
v26.7.0 annotated → 371c5f7 annotated → 2a3dae9
v26.8.0-beta.0 annotated → 3e76868 lightweight → 3e76868

git push --tags will not overwrite refs that already exist and differ, so it
fails — while the git push HEAD:refs/heads/main above it had already succeeded.
The job went red with its real work done, which is the worst shape a CI failure
takes: permanent, and therefore ignored on the day it means something. That is
what task 679 was on the merge of #12, with main sitting on GitHub at db27c35
regardless.

Dropped rather than forced. Reconciling the divergence means rewriting what a
published tag points at, which is a decision rather than a fix — say the word and
it is one --force. New tags are unaffected either way.

Branched from main

So it is active for the tag about to be cut, and so merging it back to develop
carries #12's version bump with it — develop is still on 26.8.0-beta.0.

After merging

main promotes to GitHub as before (that path is unchanged and was already
working). Then tag v26.9.0-beta.0 on main and watch Gitea's release.yml:
if the four builds pass, promote-tag hands the tag over and GitHub does the
crates.io publish. If they do not, nothing reaches crates.io — which is the
point.

🤖 Generated with Claude Code

https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2C

Needed before tagging `v26.9.0-beta.0`, because it changes what tagging does. ## The flow as described, and as it actually was The intended sequence is: promote `main`, no release; tag on Gitea and let it build the artifacts to confirm everything generates; then hand the tag to GitHub, which publishes to crates.io. Steps two and three were not sequential. `promote.yml` and `release.yml` both triggered on the same `v*` push, so Gitea began building and pushed the tag to GitHub in the same moment — and the tag arriving there is what starts GitHub's build and its `publish-crate`. The local build could not gate anything: by the time it could have failed, the crate was already on its way out, and crates.io has no unpublish, only yank. Tag promotion moves into `release.yml` as `promote-tag`, Gitea-only and behind `needs: build`. Now the four targets build and every artifact the runners can execute is executed, and only then does GitHub hear about the tag. ## `git push --tags` has been failing on every push to main Not new, and not caused by the recent work. The tags diverged between the forges: | tag | Gitea | GitHub | |---|---|---| | `v26.7.0` | annotated → `371c5f7` | annotated → `2a3dae9` | | `v26.8.0-beta.0` | annotated → `3e76868` | lightweight → `3e76868` | `git push --tags` will not overwrite refs that already exist and differ, so it fails — while the `git push HEAD:refs/heads/main` above it had already succeeded. The job went red with its real work done, which is the worst shape a CI failure takes: permanent, and therefore ignored on the day it means something. That is what task 679 was on the merge of #12, with `main` sitting on GitHub at `db27c35` regardless. Dropped rather than forced. Reconciling the divergence means rewriting what a published tag points at, which is a decision rather than a fix — say the word and it is one `--force`. New tags are unaffected either way. ## Branched from `main` So it is active for the tag about to be cut, and so merging it back to `develop` carries #12's version bump with it — `develop` is still on `26.8.0-beta.0`. ## After merging `main` promotes to GitHub as before (that path is unchanged and was already working). Then tag `v26.9.0-beta.0` on `main` and watch Gitea's `release.yml`: if the four builds pass, `promote-tag` hands the tag over and GitHub does the crates.io publish. If they do not, nothing reaches crates.io — which is the point. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_012x1UPw987zNSxjH2DxHy2C
chrnx added 1 commit 2026-09-05 22:32:48 +00:00
ci: make this forge the gate it was meant to be, and stop pushing every tag
CI / installer (macos-14) (pull_request) Successful in 3s
CI / check (pull_request) Successful in 27s
CI / starter (bun) (pull_request) Successful in 30s
CI / starter (deno) (pull_request) Successful in 31s
CI / starter (edge) (pull_request) Successful in 36s
CI / starter (node) (pull_request) Successful in 32s
CI / core-freshness (pull_request) Has been skipped
CI / installer (ubuntu-latest) (pull_request) Successful in 10s
483cc23dea
Two problems in one place, one of them latent since before this release.

`promote.yml` and `release.yml` both fired on the same `v*` tag push, so Gitea
started building and handed the tag to GitHub at the same moment — and the tag
arriving there is what starts GitHub's build and its crates.io publish. The local
build was therefore a parallel opinion rather than a check: by the time it could
have said no, the crate was already going out, and crates.io has no unpublish,
only yank. Tag promotion moves into `release.yml` behind `needs: build`, so the
sequence is what it was always described as — Gitea builds all four targets and
runs every artifact it can, and only then does GitHub hear about the tag.

`promote.yml` also ran `git push github --tags` on every push to `main`, which
has been failing every time. The tags diverged before this: `v26.7.0` points at
`371c5f7` here and `2a3dae9` there, and `v26.8.0-beta.0` is annotated here and
lightweight there — so the push is a non-fast-forward on refs that already exist.
`main` itself was pushed by the line above and always succeeded, so the job went
red while its actual work had already been done, which is the worst shape a CI
failure can take: permanent, and therefore ignored on the day it means something.
Dropped rather than forced, because reconciling the divergence rewrites what a
published tag points at — a decision, not a fix. New tags are unaffected; they go
through `release.yml` now.

Branched from `main` rather than `develop` so it is active for the v26.9.0-beta.0
tag, and so merging it back carries the release's version bump to `develop` with
it.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx added 1 commit 2026-09-05 22:37:20 +00:00
ci: use the expression form for the tag ref, not the env var
CI / installer (macos-14) (pull_request) Successful in 3s
CI / check (pull_request) Successful in 27s
CI / starter (bun) (pull_request) Successful in 32s
CI / starter (deno) (pull_request) Successful in 31s
CI / starter (edge) (pull_request) Successful in 37s
CI / core-freshness (pull_request) Has been skipped
CI / installer (ubuntu-latest) (pull_request) Successful in 11s
CI / starter (node) (pull_request) Successful in 32s
6304ad7e24
promote.yml handed v26.8.0-beta.0 to GitHub with `${{ github.ref_name }}`, so
that form is proven on this act_runner. `$GITHUB_REF_NAME` is not — act_runner
0.2.13 may or may not export it, and the failure mode is silent in the worst
way: `git push github "refs/tags/"` with an empty name, a tag that never leaves
this forge, and a release that simply never happens on GitHub.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx merged commit 56340f6b21 into main 2026-09-06 19:43:39 +00:00
Sign in to join this conversation.