Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

publish/github/README.md

publish/github — the trusted-publishing road to PyPI

The second of facett's two roads to PyPI (the first is cargo ops publish-pypi with an API token; both are written out step by step in .nornir/pypi-publish.md).

.github/workflows/pypi.yml in this folder is a GitHub Actions workflow that publishes the two facett releases — facett (the components) and facett-demo (the Streamlit app) — with PyPI trusted publishing (OIDC): no API token is stored anywhere.

What it does, and what it deliberately does not

Where it runs: the ignalina GitHub mirror

The nordisk repos are mirrored from Codeberg to PRIVATE GitHub repos under the Ignalina organization by ~/mirror-ignalina/mirror-to-github.sh (SSH, all branches + tags + LFS, force-pushed from Codeberg on every run). facett is mirrored the same way, to github.com/Ignalina/facett. Two consequences:

The PyPI side (once per project, per index)

pypi.org (the ignalina account) → Your account → Publishing → Add a new pending publisher → GitHub:

field facett facett-demo
PyPI project name facett facett-demo
Owner Ignalina Ignalina
Repository name facett facett
Workflow name pypi.yml pypi.yml
Environment name pypi pypi

The same two on test.pypi.org with environment testpypi. In the GitHub repo, Settings → Environments: create pypi (add a required reviewer) and testpypi.

A release

# on the build box, in the facett checkout (main, pushed to Codeberg)
cargo xtask wrap-wasm && cargo ops publish-pip && cargo ops verify-demo-install
cargo ops publish-pypi --dry-run
git tag v0.2.0 && git push origin v0.2.0
bash ~/mirror-ignalina/mirror-to-github.sh facett     # the tag (and the workflow) reach GitHub

Then on github.com/Ignalina/facett: Releases → Draft a new release, tag v0.2.0, attach pkg-facet-wrapped/dist/facett-0.2.0-py3-none-any.whl, py/dist/facett_demo-0.2.0-py3-none-any.whl, py/dist/facett_demo-0.2.0.tar.gz, and the two SHA256SUMS renamed SHA256SUMS.facett / SHA256SUMS.facett-demo (both are named SHA256SUMS on disk); tick pre-release, publish.

If the repository is private and the publish action reports that it cannot produce attestations for it, add attestations: false under its with:.