ci(release): spend the publish's one dist-tag on latest while there is no stable #60

Merged
chrnx merged 1 commits from ci/publish-under-latest into develop 2026-08-19 19:18:22 +00:00
Owner

Corrige el enfoque anterior con lo que aprendimos en v26.8.0-beta.1: el intercambio OIDC de Trusted Publishing vive dentro de publish.js, así que el token que devuelve es sólo para publish y npm dist-tag add responde E401. El paso falló después de que npm y JSR ya tenían la versión.

Queda una sola escritura a npm por release. Mientras no haya estable, latest y beta significan lo mismo, y latest se lleva el publish porque es lo que resuelve npm install @green-tea/core a secas. El tag de canal se mueve a mano; el paso imprime el comando y AGENTS.md dice cuándo aplica.

Es temporal por construcción: en cuanto exista una estable, latest es suyo y el publish vuelve a poner el tag de canal directo, sin nada manual.

Casos verificados localmente:

versión registro --tag manual
26.8.0-beta.2 sólo betas latest mover beta
26.9.0 sólo betas latest —
26.9.1-beta.0 ya hay 26.9.0 beta —
26.9.1-rc.0 ya hay 26.9.0 rc —
Corrige el enfoque anterior con lo que aprendimos en `v26.8.0-beta.1`: el intercambio OIDC de Trusted Publishing vive dentro de `publish.js`, así que el token que devuelve es sólo para publish y `npm dist-tag add` responde `E401`. El paso falló después de que npm y JSR ya tenían la versión. Queda una sola escritura a npm por release. Mientras no haya estable, `latest` y `beta` significan lo mismo, y `latest` se lleva el publish porque es lo que resuelve `npm install @green-tea/core` a secas. El tag de canal se mueve a mano; el paso imprime el comando y AGENTS.md dice cuándo aplica. Es temporal por construcción: en cuanto exista una estable, `latest` es suyo y el publish vuelve a poner el tag de canal directo, sin nada manual. Casos verificados localmente: | versión | registro | `--tag` | manual | |---|---|---|---| | 26.8.0-beta.2 | sólo betas | `latest` | mover `beta` | | 26.9.0 | sólo betas | `latest` | — | | 26.9.1-beta.0 | ya hay 26.9.0 | `beta` | — | | 26.9.1-rc.0 | ya hay 26.9.0 | `rc` | — |
chrnx added 1 commit 2026-08-19 19:17:27 +00:00
ci(release): spend the publish's one dist-tag on latest while there is no stable
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 14s
CI / build (pull_request) Successful in 24s
CI / runtimes (deno) (pull_request) Successful in 18s
CI / runtimes (edge) (pull_request) Successful in 12s
19fcc18899
`npm dist-tag` cannot use Trusted Publishing. The OIDC exchange lives inside
`publish.js` and nowhere else, so the token it returns is publish-scoped: the
step added in the previous commit got `E401` on v26.8.0-beta.1, after both
registries had already taken the version.

That leaves one npm write per release, and it has to go where it counts.
While no stable exists, `latest` and `beta` mean the same thing — there is
nothing else to install — so `latest` takes the publish, because that is what
a bare `npm install @green-tea/core` resolves to and an untouched `latest`
hands the default install an older build than the one just released. The
channel tag is moved by hand; the step prints the command and AGENTS.md says
when it applies.

This is temporary by construction. Once a stable version exists it owns
`latest`, a beta published afterwards must not drag it backwards, and the
publish goes back to setting the channel tag directly — with nothing left to
move by hand.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
chrnx merged commit ead71dc1b1 into develop 2026-08-19 19:18:22 +00:00
Sign in to join this conversation.