Release: publish to the forge's Composer registry, not Packagist (macula-php#2) #4
Loading…
Reference in a new issue
No description provided.
Delete branch "pallas/2-composer-registry"
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?
Refs macula-io/macula-php#2. DECIDED 2026-11-24 "we will ONLY use our own package management on the forge....no API key theatre we are sovereign".
What changes. The tag's
releasejob no longer tells Packagist: it zips the tagged tree and PUTs it to the forge's own Composer registry,/api/packages/macula-sdk/composer, with the tag's number as?version=. Authentication is the repository's forge publisher account,vars.FORGE_PACKAGES_USER/secrets.FORGE_PACKAGES_TOKEN, passed to curl as a config on stdin — never on a command line, never in a URL, never printed. After a201the job reads the registry's ownp2metadata back with no credentials and fails if the version is not in it, so a version only an uploader could see is not a publish.What is removed. The Packagist call, the
PACKAGIST_TOKENsecret, and the mirror wait — the upload needs no mirror.RELEASING.mdand the README now name the registry a consumer adds (https://git.macula.io/api/packages/macula-sdk/composer), andci.yml's two gate comments follow the same change.A dispatch still cannot publish. The upload step is gated on the event being a tag push, never on an input; the dispatch builds the archive and stops.
Proven locally, verbatim from the file's own step text:
composer.jsonat the root, no.gitentry, 125 entries, sha256 printed; a tag that names nox.y.zand a tree with nocomposer.jsoneach refuse.PUT /api/packages/macula-sdk/composer?version=0.32.0, basic userci-publisher, body 327,955 bytes whose sha256 equals the archive the step built, then aGETof thep2metadata carrying noAuthorizationheader — the branch a consumer takes.409prints the registry's answer and exits non-zero.strace -f -e trace=execve: the token in zero argv; the positive control is the realcurl … -K - --upload-file.Still unproven, and named: the publish itself waits for the
macula-sdkorg (macula-io/forge-setup#36) and a publisher account that may write packages in it; the dispatch proof needs Actions on. Thep2shape was not captured from a live package — no Composer package exists on this forge yet — so the read-back grep is whitespace-tolerant and looks only for the version it uploaded.🤖 Generated with Claude Code