@qauth-labs/plugin-github is released to npm from a tag of this repository,
by .github/workflows/release.yml, through npm's trusted publishing: the
workflow proves who it is with GitHub's OIDC token, holds no npm token, and
npm attaches provenance. The workflow only stages the version; it goes
live when a maintainer approves the stage on npmjs.com with 2FA. This is the
way QAuth's own SDK packages are released (release-npm.yml in
qauth-labs/qauth).
The package has its own version line, not QAuth's.
0.xwhile QAuth's plugin API is experimental (PLUGIN_API_ENABLED).- Each release is preceded by release candidates,
X.Y.Z-rc.N, which go to thenextdist-tag. A release goes tolatest. No other pre-release form is published. - The README's compatibility table says which QAuth versions and which AuthMethod contract each version is for. Update it in the same pull request as the version.
-
In a pull request, set
versioninpackage.json(for example0.1.0-rc.1) and move theUnreleasedentries ofCHANGELOG.mdunder## [0.1.0-rc.1], update the links at the bottom and the README's compatibility table. Merge it when CI is green. -
Tag the merge commit on
mainand push the tag:git tag -s v0.1.0-rc.1 -m v0.1.0-rc.1 git push origin v0.1.0-rc.1
-
release.ymlruns the whole CI again (checks, contract test kit, end-to-end suite), checks that the tag points at a commit onmain, that it names the version inpackage.jsonand thatCHANGELOG.mdhas its section, builds and packs the tarball once with pnpm and stages it on npm (npm stage publish), from thenpmenvironment. -
Approve the stage on npmjs.com with 2FA. Check the version, the dist-tag and the provenance before approving.
-
Publish the draft GitHub release the run left, with the tarball and the changelog section.
npm configures a trusted publisher only for a package that exists. Before the first release, a maintainer:
- Publishes a placeholder by hand, from an empty directory, once:
@qauth-labs/plugin-github@0.0.0with only apackage.jsonand a README that points here. - On npmjs.com, under the package's settings, adds the trusted publisher:
the organisation
qauth-labs, the repositoryplugin-github, the workflowrelease.yml, the environmentnpm. Then sets publishing access to require 2FA and disallow tokens. - In this repository's settings, creates the
npmenvironment and limits it to tags matchingv*, and adds a tag ruleset that lets only maintainers create or movev*tags.
Nothing else holds a credential: the workflow's id-token: write permission
is granted only to the job that stages the package.