Release on the forge: npm with a token, the pinned reusables, and the ci-node digest (macula-io/macula-ts#2) #3

Open
ceres wants to merge 0 commits from ceres/2-forge-release-port into main
Member

@macula-io/ts releases from git.macula.io again: a v* tag publishes that version to the forge's npm registry with a token, and nothing on GitHub is needed (macula-io/macula-ts#2).

What changes

  • The registry owner is named once, in package.json's publishConfig: https://git.macula.io/api/packages/macula-pub/npm/, access: public. The workflow names no registry; it derives the npm auth keys (//host/path/:_authToken, :username) from that URL, and the token/user arrive through FORGE_PACKAGES_TOKEN / FORGE_PACKAGES_USER. The org is macula-pub, not macula-sdk: DECIDED 2026-11-24, the rename, and macula-sdk now answers 307 to it.
  • Trusted Publishing goes, with id-token: write and the build-provenance attestation it needed.
  • The three Node/Go jobs run in macula-ci-node, pinned by digest a0b86199f76a… — built from macula-ci-images main 40f632af (build task 8368), twin task 8303 green, digest read back from the registry. A container carries no marketplace action, so each job's checkout is the plain-shell step the forge repositories carry byte-identical, and there is no JavaScript action anywhere in the file.
  • The two cross-repository reusables are pinned local copies (ci-images-release-guard.yml, dependency-advisories.yml, from commit 8db10eb): a cross-repository reusable fails to expand on the forge and takes the file's other jobs with it.
  • A rehearsal: workflow_dispatch runs every gate and the linux-x64 leg and stops at npm publish --dry-run — no tag, nothing uploaded. It is how the path is proved before the first tag.
  • A tag release still refuses an incomplete prebuild set, by name: only linux-x64 is built on the forge's one Linux runner, and the other four platforms (linux-arm64, darwin-x64, darwin-arm64, win32-x64) are Raf's call in the release menu. The refusal is the promise that a published package loads where package.json says it does.
  • README carries the one .npmrc line a consumer needs for the scope.

Proof

  • The linux-x64 leg in the ci-node image: prebuilds/linux-x64/@macula-io+ts.node builds, loads (C ABI 2) and generates a key with build/ removed; needs at most GLIBC_2.34 / GLIBCXX_3.4.29, and loads and generates a key on Ubuntu 22.04.5 (glibc 2.35), so building in the bookworm image does not raise macula-ts#12's floor — the measurement is on the issue (comment 3110).
  • The tag/version guard, the install-script and prebuild-set proof, and the dist/ freshness check are unchanged in intent from GitHub; each was exercised on the rehearsal path.
  • The reusables are byte-identical copies of the ci-images commits they name.

Not in this change

The other four prebuild platforms (owner's call, in the release menu), and the sdk-publisher account line (one account for all SDKs, macula-pub only, write:package only — created as one line in the SDK release menu, not here).

When macula-ci-images#27 (PR 33) lands, macula-ci-node moves to the macula-pub org and the three container: digests are updated in a follow-up.

Refs #2.

`@macula-io/ts` releases from git.macula.io again: a `v*` tag publishes that version to the forge's npm registry with a token, and nothing on GitHub is needed (macula-io/macula-ts#2). ## What changes - **The registry owner is named once**, in `package.json`'s `publishConfig`: `https://git.macula.io/api/packages/macula-pub/npm/`, `access: public`. The workflow names no registry; it derives the npm auth keys (`//host/path/:_authToken`, `:username`) from that URL, and the token/user arrive through `FORGE_PACKAGES_TOKEN` / `FORGE_PACKAGES_USER`. The org is macula-pub, not macula-sdk: DECIDED 2026-11-24, the rename, and macula-sdk now answers 307 to it. - **Trusted Publishing goes**, with `id-token: write` and the build-provenance attestation it needed. - **The three Node/Go jobs run in `macula-ci-node`**, pinned by digest `a0b86199f76a…` — built from macula-ci-images main `40f632af` (build task 8368), twin task 8303 green, digest read back from the registry. A container carries no marketplace action, so each job's checkout is the plain-shell step the forge repositories carry byte-identical, and there is no JavaScript action anywhere in the file. - **The two cross-repository reusables are pinned local copies** (`ci-images-release-guard.yml`, `dependency-advisories.yml`, from commit `8db10eb`): a cross-repository reusable fails to expand on the forge and takes the file's other jobs with it. - **A rehearsal**: `workflow_dispatch` runs every gate and the linux-x64 leg and stops at `npm publish --dry-run` — no tag, nothing uploaded. It is how the path is proved before the first tag. - **A tag release still refuses an incomplete prebuild set**, by name: only linux-x64 is built on the forge's one Linux runner, and the other four platforms (linux-arm64, darwin-x64, darwin-arm64, win32-x64) are Raf's call in the release menu. The refusal is the promise that a published package loads where package.json says it does. - README carries the one `.npmrc` line a consumer needs for the scope. ## Proof - The linux-x64 leg in the ci-node image: `prebuilds/linux-x64/@macula-io+ts.node` builds, loads (C ABI 2) and generates a key with `build/` removed; needs at most GLIBC_2.34 / GLIBCXX_3.4.29, and loads and generates a key on Ubuntu 22.04.5 (glibc 2.35), so building in the bookworm image does not raise macula-ts#12's floor — the measurement is on the issue (comment 3110). - The tag/version guard, the install-script and prebuild-set proof, and the dist/ freshness check are unchanged in intent from GitHub; each was exercised on the rehearsal path. - The reusables are byte-identical copies of the ci-images commits they name. ## Not in this change The other four prebuild platforms (owner's call, in the release menu), and the `sdk-publisher` account line (one account for all SDKs, macula-pub only, `write:package` only — created as one line in the SDK release menu, not here). When macula-ci-images#27 (PR 33) lands, `macula-ci-node` moves to the macula-pub org and the three `container:` digests are updated in a follow-up. Refs #2.
On the forge a reusable workflow in another repository is callable only when
that repository is public, and a cross-repository call that fails to expand
takes the whole file's other jobs with it (macula-io/martha#601). The release
path here calls three of macula-ci-images': release-guard.yml and
dependency-advisories.yml from release.yml, and doc-snippets-ts.yml from
docs.yml, which release.yml's docs gate calls. Each gets the pinned local
stand-in the mcl-* repositories carry: ten header lines naming its commit, a
line of dashes, then the file byte for byte, and the header carries the diff
command that checks it.

The port itself is not in this commit: the forge release still needs Node and
Go on a forge image (macula-ts#2, waiting on the macula-ci-node image) and the
linux-x64 prebuild leg only.
The release path moves to git.macula.io.

- The registry owner is named ONCE, in package.json's publishConfig: the
  macula-pub npm registry (DECIDED 2026-11-24, the org renamed from macula-sdk
  to macula-pub). The auth keys npm reads are built from that URL, so this
  workflow names no registry of its own.
- Trusted Publishing (OIDC) goes, with the attestation it needed: FORGE_PACKAGES_TOKEN
  and FORGE_PACKAGES_USER carry the SDK's one publisher account.
- The three jobs that need Node and Go run in macula-ci-node pinned by digest
  a0b86199f76a… (built from macula-io/macula-ci-images main 40f632af, build task
  8368, the reproducibility twin task 8303 success, read back from the registry
  by Terra). A container carries no marketplace action, so the checkout is the
  plain-shell step the forge repositories carry byte-identical.
- release-guard and the advisory scan are the pinned local copies: a
  cross-repository reusable fails to expand on the forge.
- A workflow_dispatch rehearsal runs every gate and the linux-x64 leg and stops
  at `npm publish --dry-run`; a tag release still refuses an incomplete prebuild
  set, by name, until the other four platforms are ruled.
- README names the one .npmrc line a consumer needs for the scope.

When macula-ci-images#27 lands (PR 33) the image moves to the macula-pub org and
the three `container:` digests follow it in a follow-up.
Release: the npm token reaches npm as a reference, never as an argument (macula-io/macula-ts#2 r=1)
Some checks failed
ci.yml / Release: the npm token reaches npm as a reference, never as an argument (macula-io/macula-ts#2 r=1) (pull_request) Failing after 0s
docs / snippets (pull_request) Successful in 14s
docs / TypeScript blocks in the docs (pull_request) Successful in 0s
54b3ff7c4b
Neptunus's fold-in on PR 3.

- The auth keys are written into the npm userconfig as `${NODE_AUTH_TOKEN}` /
  `${NODE_AUTH_USER}` references and expanded by npm from the environment when
  it reads the file, instead of `npm config set ... "$NODE_AUTH_TOKEN"`: npm
  records its argv in ~/.npm/_logs, so the old line put the token in a debug
  log and in the file as plain text. The comment above it now says what the code
  does.
- "A rehearsal uploads nothing" is now literally true: publishing requires
  `github.event_name == 'push'` as well as a tag ref, so a workflow_dispatch made
  on a tag ref cannot reach `npm publish`.
Some checks failed
ci.yml / Release: the npm token reaches npm as a reference, never as an argument (macula-io/macula-ts#2 r=1) (pull_request) Failing after 0s
docs / snippets (pull_request) Successful in 14s
docs / TypeScript blocks in the docs (pull_request) Successful in 0s
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'ceres/2-forge-release-port:ceres/2-forge-release-port'
git switch 'ceres/2-forge-release-port'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-io/macula-ts!3
No description provided.