Appearance
Releasing and deployment
GitHub Actions builds every pull request and main push, publishes npm packages from GitHub Releases, and deploys this documentation to GitHub Pages.
Repository setup
In GitHub repository settings:
- Under Pages, select GitHub Actions as the publishing source.
- Create an
npmenvironment. Add deployment protection rules if releases should require approval. - On npmjs.com, configure
pystdwith a GitHub Actions trusted publisher:- organization/user and repository: this GitHub repository;
- workflow filename:
publish.yml; - environment:
npm; - allowed action:
npm publish.
The npm workflow uses OIDC and does not require an NPM_TOKEN secret. The package contains its canonical repository URL so npm provenance matches the actual source repository.
Publish a release
Record release intent during development with pnpm change. Apply the release plan, commit it to main, and ensure package.json contains the release version. Then create the GitHub Release; gh creates its tag at the selected commit, so do not push a separate release tag:
bash
git push origin main
gh release create v0.3.0 --target main --title "pystd 0.3.0" --generate-notesOnly the GitHub release.published event starts publish.yml; pushing a tag does not publish to npm. The workflow checks out the release tag and rejects it unless it exactly matches v${package.json.version}. It disables dependency caches, builds the WASM once, tests that exact output, then publishes through npm trusted publishing. Provenance is generated automatically by npm for public packages published with OIDC.
Documentation deployment
Every main pipeline deploys the documentation using the same tested build artifact, so the interactive playground uses current production output without rebuilding WASM. The site base path is derived from GITHUB_REPOSITORY, including support for both project Pages and <owner>.github.io repositories.