fix(workflows): restore derive-tag fallback, document v0.5.2 findings #36
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/publish-trigger-fixes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two commits, two files. Restores the
FORGEJO_REF_NAMEfallback that PR #35 deleted, and documents two v0.5.2-empirical findings in AGENTS.md: drafts don't firerelease: publishedon this host, and the runner does not populateFORGEJO_EVENT_RELEASE_TAG_NAME.Why
publish:npmwith::error::Tag is not v-prefixed. The release page is currently live but empty (no assets, no npm package).FORGEJO_REF_NAMEfallback inscripts/publish/derive-tag.sh, relying onFORGEJO_EVENT_RELEASE_TAG_NAMEalways being set. Two checks confirm it isn't:docs/user/actions/reference§env) enumerate everyFORGEJO_*env var the runner guarantees.FORGEJO_EVENT_RELEASE_TAG_NAMEis not in the list. Only generic variables (FORGEJO_REF,FORGEJO_REF_NAME,FORGEJO_SHA, ...) andFORGEJO_EVENT_PATH(JSON payload) are documented.FORGEJO_REF=refs/tags/v0.5.1. v0.5.2's post-PR-#35 script failed becauseFORGEJO_EVENT_RELEASE_TAG_NAMEwas empty and no fallback existed.forgejo.event.release.tag_namevia the workflow context and reading it from a different env var. More invasive (touches the workflow file), and the long-term fix should also include parsingFORGEJO_EVENT_PATH(the documented way to get release-specific data) — out of scope for this PR.release: publishedwas based on the upstream v16.0 docs. On this host build (v16.0.3 + gitea-1.22.0) drafts do not fire. v0.5.2 confirmed empirically: the draft created at 22:33:54Z did not startpublish.yaml; the same release recreated withdraft: falsefired it at 22:36:01Z. AGENTS.md is corrected.Verification
bun run linton the branchbun run typecheckon the branchtsc --noEmitexit 0bun teston the branchscripts/publish/derive-tag.shbyte-equal to v0.5.1 formOut of scope
package.json["version"]— AGENTS.md guardrail still says the published artifact's version comes from the tag, drift is expected.event_name/refclaim rules — admin-UI change, not a repo change. The loose rules were needed for the v0.5.1 dispatch path; now thatworkflow_dispatchis gone, retightening is a follow-up.FORGEJO_EVENT_PATHJSON forrelease.tag_name— the proper long-term fix; defer to a separate PR.Follow-ups after merge
v0.5.2(per AGENTS.md step 3: delete the failed release and re-do from a fresh commit).v0.5.2at the merge commit (29ccdef).create_release(v0.5.2, draft=false, body=<end-user note>)— the body's already drafted: "v0.5.2 ships no user-facing changes since v0.5.1. This release is tooling-only..."watch_action_runto terminal status; report any failure per the report-only policy locked for v0.5.2.