0008. Publish both packages and the schema site from one release workflow#
Date: 2026-10-09
Context#
The Python and npm packages share one schema version and must be published
together without long-lived registry secrets. Every version’s schema
document names its own URL as its $id, and a host that refers to it must
be able to fetch it there.
Considered options#
One tag and one workflow using OIDC trusted publishing.
Two tags.
Stored PyPI and npm tokens.
release-please.
Write release automation ourselves.
Serve the schema documents from GitHub Pages, deployed by the release workflow: the repository’s own Pages site, the organisation site, or both.
Serve them from a registry CDN (the npm package’s files) or from raw repository URLs.
Decision#
Publish both packages from one version tag using GitHub Actions OIDC trusted publishing. TimeToAlign maintainers retain a single review point, and the bus factor is improved by avoiding personal tokens. Primary sources: https://docs.pypi.org/trusted-publishers/, https://docs.npmjs.com/trusted-publishers, and https://docs.github.com/actions/security-for-github-actions/security-hardening-your-deployments/about-security-hardening-with-openid-connect.
npm configures a trusted publisher only for a package that already exists, so the npm package’s first version was published by a maintainer; every later version is published through trusted publishing and no token is stored. PyPI accepts a trusted publisher for a project before its first release and needs no token. A manual run of the workflow naming a release tag publishes that release again and skips every file a registry already holds, so a release whose publishing failed part-way is completed without a new version.
A version publishes every file of schema/<version>/ (the manifest schema,
the provenance schema and the column types of the tables, tables.json)
and the catalogue’s schema catalogue/catalogue.schema.json, and every
released document is served at two addresses. Its $id is lowercase,
https://timetoalign.github.io/timetoshare/<version>/<document>,
a path of the organisation site, which the repository
TimeToAlign/timetoalign.github.io publishes. The repository
TimeToAlign/TimeToShare publishes its own Pages site under
https://timetoalign.github.io/TimeToShare/, and a Pages path is
case-sensitive: /TimeToShare/ and /timetoshare/ are different addresses,
and a project site is served only under its repository’s name as spelled.
Both sites are assembled by one standard-library script,
scripts/check_published.py, which reads a tag’s documents and refuses a
tag whose documents lack an $id, name another address than their own, or
refer to a document or a member not served; continuous integration runs it
over the working tree and over every release tag, as the release does. So
two jobs follow the publishing:
The pages job deploys the repository’s Pages site holding
<version>/<document>for every document of every released tag, assembled from the tags themselves, so every released document stays served athttps://timetoalign.github.io/TimeToShare/<version>/<document>. It uses GitHub’s own actionsactions/configure-pages@v6,actions/upload-pages-artifact@v5andactions/deploy-pages@v5, and no other dependency. Primary source: https://docs.github.com/pages/getting-started-with-github-pages/using-custom-workflows-with-github-pages.The org-site job writes the released documents, assembled from the release tag, to
timetoshare/<version>/in the organisation site’s repository and pushes them to that repository’s default branch asgithub-actions[bot], committing only when a file changed, so every$idresolves. It authenticates with a deploy key, the secretORG_SITE_DEPLOY_KEY, which may write to that one repository only, and usesactions/checkout@v7and git alone. Primary source: https://docs.github.com/authentication/connecting-to-github-with-ssh/managing-deploy-keys.
Consequences#
The workflow depends on no registry token and on nothing that enters a
package’s runtime. GitHub Actions and publisher
actions carry their own licences and transitive action dependencies. One
release cadence keeps versions aligned; exiting to separate tags costs
process and version checks. Writing OIDC exchange logic ourselves would add
security-sensitive maintenance. Each deployment replaces the whole site, so
the repository’s site depends on the release tags alone, never on a stored
copy. The organisation site keeps every document it was given, one commit per
release, and depends on the deploy key; without the key the $id of a new
release stays unresolved while the repository’s site serves it. A registry
CDN or a raw repository URL would not resolve the $id the document names,
and a lowercase repository name would serve the $id from the repository’s
site alone, at the cost of a repository name differing from the format’s.
Review date#
2027-10-09.