Skip to content

Tell titaniumsdk.com to recapture when a release publishes - #992

Open
cb1kenobi wants to merge 1 commit into
mainfrom
chris/notify-site-on-release
Open

Tell titaniumsdk.com to recapture when a release publishes#992
cb1kenobi wants to merge 1 commit into
mainfrom
chris/notify-site-on-release

Conversation

@cb1kenobi

Copy link
Copy Markdown
Member

Adds a notify-titaniumsdk job to publish.yml, so shipping a CLI updates the
website instead of waiting for someone to remember.

Why

titaniumsdk.com names the current CLI version on its landing page and on
/downloads, and derives the minimum CLI for each SDK release on its
compatibility page from the same captured data. The site is statically
generated and takes no network at build time, so a CLI release changes nothing
there until something tells it to recapture. Today that is a manual
pnpm registry:cli.

How

notify-titaniumsdk:
  needs: publish
  if: github.repository_owner == 'tidev'
  uses: tidev/titaniumsdk.com/.github/workflows/notify-cli-release.yml@main
  secrets:
    dispatch-token: ${{ secrets.REGEN_DOCS_GITHUB_TOKEN }}

The dispatch itself lives in titaniumsdk.com, which is how the seventeen
API-doc source repositories already notify it (notify-api-docs.yml, called by
tidev/titanium-sdk among others). The event name and the target repository are
that site's to change, so a rename there does not become a pull request here.

It carries no payload beyond the release tag, which is used for the commit
message. The capture reads the whole release history from GitHub and every
version from npm on its own.

Two things worth reviewing

needs: publish is load-bearing, not tidy. The capture reads
engines.node from the npm packument. A release that reached the site before
npm had the tarball would be recorded with a date and a URL but no Node range,
and that range is what the compatibility page reads. Running after the publish
step is what makes the packument current.

Prereleases dispatch too. publish.yml already publishes them under the
next tag. The site records prereleases in its registry but never advertises
one as the current version, so this is correct and needs no condition.

Before this can merge

  • The receiving side is titaniumsdk.com#55,
    which adds notify-cli-release.yml and refresh-cli-releases.yml. That has
    to land on main first
    - this job references it at @main and will fail to
    resolve until then.
  • REGEN_DOCS_GITHUB_TOKEN must be visible to this repository. It is the same
    org secret tidev/titanium-sdk uses for its notify job; I could not verify
    its repository scope without org admin. If it is not in scope, this job fails
    loudly on a 401 rather than going quietly green.

Validated with actionlint (clean).

🤖 Generated with Claude Code

The site names the current CLI version on its landing page and on /downloads,
and derives the minimum CLI for each SDK release from the same data. All of it
is statically generated, so a release changes nothing there until something
recaptures - which was a manual step nobody was going to remember.

The dispatch lives in titaniumsdk.com, the way the seventeen API-doc source
repositories already work: the event name and the target repository are that
site's to change, so a rename does not become a pull request here.

`needs: publish` is load-bearing. The capture reads `engines.node` from the npm
packument, so a release that reached the site before npm had the tarball would
be recorded with a date and a URL but no Node range.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant