[ci] Release artifacts not published — --from-ci install path blind to this repo #13
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_biz#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Audit context
Filed during Phase 2 CI audit (hero_demo#54, session 55).
State
v0.1.0,v0.1.1,v0.1.2hero_biz 0.1.2✓ binary presentbuild-linux.yamlruns reportstatus=successRoot cause
scripts/build_lib.sh::publish_binarieswrites only to the Forgejo package registry (/api/packages/<owner>/generic/<pkg>/<version>/<asset>). It never writes a Forgejo Release nor uploads to/api/v1/repos/<repo>/releases/<id>/assets.svc_install_from_ci(in hero_skills/tools/modules/services/lib.nu) downloads fromforge.ourworld.tf/<repo>/releases/download/<tag>/<asset>— i.e. release assets. Net: this repo's CI succeeds but--from-ci hero_bizcannot find any artifact.Cluster
Same root cause: hero_books#118, hero_browser#16. hero_foundry#26 is likely affected too (Feb-2026 runs predate publish step working). All four use the same shared-helper template.
Recommended fix
Mirror hero_proc / hero_router pattern: add explicit Create Release + Upload Release Assets steps to
build-linux.yaml(using/api/v1/repos/<repo>/releasesand/releases/<id>/assets). Keep the existing pkg-registry publish.Highest leverage: add a
publish_release_assetshelper toscripts/build_lib.shand call it alongsidepublish_binaries. The fix would propagate to all repos using build_lib.sh once they pull the update.Effort
Quick win — single new step modeled on hero_proc's
build-linux.yamllines 53-106. Estimated 1-2 h to implement, tag, validate. Phase 2 implementation.v*tag has been pushed;build-linux.yamlexists but never triggered #5--from-ciblind #118--from-ciinstall path blind to this repo #16Fix CI so that `--from-ci hero_biz` installs correctly. `build-linux.yaml` only calls `publish_binaries`, which pushes to the Forgejo generic package registry. `svc_install_from_ci` resolves binaries via the Forgejo Release asset endpoint (`/releases/download/<tag>/<asset>`), which is never populated by CI. This spec adds a `publish_release_assets` helper to `scripts/build_lib.sh` and two new steps to `build-linux.yaml` that mirror the hero_proc pattern.
Implementation Spec for Issue #13
Objective
Fix CI so that
--from-ci hero_bizinstalls correctly.build-linux.yamlonly callspublish_binaries, which pushes to the Forgejo generic package registry.svc_install_from_ciresolves binaries via the Forgejo Release asset endpoint (/releases/download/<tag>/<asset>), which is never populated by CI. This spec adds apublish_release_assetshelper toscripts/build_lib.shand two new steps tobuild-linux.yamlthat mirror the hero_proc pattern.Requirements
publish_release_assetsfunction inscripts/build_lib.shthat creates (or retrieves existing) a Forgejo Release for the current tag and uploads each binary as a release asset.build-linux.yamlgrows two new steps ("Create Release", "Upload Release Assets") placed before the existing "Publish" step.jqmust be available in the CI container (added to the "Setup toolchain" step).BIN_DIR,SERVER, andOWNER— a latent bug where it relies on env vars that don't survive across steps.Files to Modify
.forgejo/workflows/build-linux.yamljqto toolchain step; add "Create Release" and "Upload Release Assets" steps; fix "Publish" step env exportsscripts/build_lib.shpublish_release_assetsfunction afterpublish_binariesImplementation Plan
Step 1: Add
publish_release_assetstobuild_lib.shFile:
scripts/build_lib.shInsert after closing of
publish_binaries. The function:BIN_DIR,BINARIES,FORGEJO_TOKEN,SERVER,OWNER,PROJECT_NAME/api/v1/repos/$OWNER/$PROJECT_NAME/releasesto create the release/releases/tags/$TAGif POST returns null id (already exists)$BINARIES, uploads each as<bin>-<suffix>via POST to/releases/$RELEASE_ID/assets?name=<artifact>Content-Type: application/x-pie-executable(matches hero_proc pattern)Dependencies: none (parallel with Step 2)
Step 2: Add
jqto "Setup toolchain" step inbuild-linux.yamlFile:
.forgejo/workflows/build-linux.yamlAppend
apt-get install -y jqafter the existingsetup_linux_toolchaincall.Dependencies: none (parallel with Step 1)
Step 3: Add "Create Release" and "Upload Release Assets" steps to
build-linux.yamlFile:
.forgejo/workflows/build-linux.yamlInsert between the "Build" step and the existing "Publish" step:
"Create Release" step (inline YAML shell, outputs
release_idvia$GITHUB_OUTPUT):github.ref_name,github.server_url,github.repositoryrelease_id=<id>to$GITHUB_OUTPUT"Upload Release Assets" step (calls
publish_release_assetsfrombuild_lib.sh):build_lib.shBIN_DIR="$(bin_dir "${{ matrix.target }}")",SERVER,OWNERpublish_release_assets "${{ github.ref_name }}" "${{ matrix.artifact }}"Dependencies: Steps 1 and 2
Step 4: Fix the existing "Publish" step env exports
File:
.forgejo/workflows/build-linux.yamlAdd
export BIN_DIR="$(bin_dir "${{ matrix.target }}")",SERVER,OWNERto the existing "Publish" step before callingpublish_binaries.Dependencies: Step 3
Acceptance Criteria
v*tag produces a Forgejo Release at/releases/tag/<tag>with four assets:hero_biz-linux-amd64,hero_biz_ui-linux-amd64,hero_biz-linux-arm64,hero_biz_ui-linux-arm64svc_install_from_ci hero_bizsucceeds — downloads from/releases/download/<tag>/<asset>without 404publish_release_assetscan be called locally with env vars setNotes
buildenv.shdeclaresVERSION="0.1.0"butCargo.tomlworkspace hasversion = "0.5.0"— pre-existing mismatch tracked separately. The CI derives release tag fromgithub.ref_name, notVERSION, so this does not block the fix.publish_release_assetsinbuild_lib.sh) would propagate to hero_books#118, hero_browser#16, and hero_foundry#26 once they pull the shared helper update.Resolved by PR #23 (merged 2026-05-04), which replaced
publish_binarieswith the inline three-step pattern (Create Release → Upload Release Assets → Upload to Package Registry) inbuild-linux.yaml, and switched asset naming to target triples (x86_64-unknown-linux-musl). Consumer side wired in hero_skills#204. The spec comment posted earlier today is superseded by this.