|
| 1 | +# Trusted Publishing Setup |
| 2 | + |
| 3 | +The repository includes manual workflows for JSR, PyPI, and GitHub Container Registry. They are designed to publish real packages without storing long-lived platform tokens in GitHub secrets. |
| 4 | + |
| 5 | +## JSR |
| 6 | + |
| 7 | +Workflow: |
| 8 | + |
| 9 | +```text |
| 10 | +.github/workflows/publish-jsr.yml |
| 11 | +``` |
| 12 | + |
| 13 | +Package: |
| 14 | + |
| 15 | +```text |
| 16 | +packages/jsr-routerbase |
| 17 | +``` |
| 18 | + |
| 19 | +Before running: |
| 20 | + |
| 21 | +- Create or claim the `@routerbase` scope on JSR. |
| 22 | +- Configure trusted publishing for `RouterBase/routerbase-examples`. |
| 23 | +- Set the package path to `packages/jsr-routerbase`. |
| 24 | +- Run the workflow manually from GitHub Actions. |
| 25 | + |
| 26 | +Local verification: |
| 27 | + |
| 28 | +```bash |
| 29 | +cd packages/jsr-routerbase |
| 30 | +npx jsr publish --dry-run |
| 31 | +``` |
| 32 | + |
| 33 | +## PyPI |
| 34 | + |
| 35 | +Workflow: |
| 36 | + |
| 37 | +```text |
| 38 | +.github/workflows/publish-pypi.yml |
| 39 | +``` |
| 40 | + |
| 41 | +Package: |
| 42 | + |
| 43 | +```text |
| 44 | +packages/python-routerbase |
| 45 | +``` |
| 46 | + |
| 47 | +Before running: |
| 48 | + |
| 49 | +- Create the `routerbase-client` project on PyPI through the first trusted publish. |
| 50 | +- Configure PyPI trusted publishing for `RouterBase/routerbase-examples`. |
| 51 | +- Use workflow name `Publish PyPI`. |
| 52 | +- Use package directory `packages/python-routerbase`. |
| 53 | + |
| 54 | +Local verification: |
| 55 | + |
| 56 | +```bash |
| 57 | +cd packages/python-routerbase |
| 58 | +python -m build |
| 59 | +python -m twine check dist/* |
| 60 | +``` |
| 61 | + |
| 62 | +## GitHub Container Registry |
| 63 | + |
| 64 | +Workflow: |
| 65 | + |
| 66 | +```text |
| 67 | +.github/workflows/publish-ghcr.yml |
| 68 | +``` |
| 69 | + |
| 70 | +Image: |
| 71 | + |
| 72 | +```text |
| 73 | +ghcr.io/routerbase/routerbase-prompt-runner |
| 74 | +``` |
| 75 | + |
| 76 | +Before running: |
| 77 | + |
| 78 | +- Confirm the repository has package write permission. |
| 79 | +- Run the workflow manually from GitHub Actions. |
| 80 | +- After the first push, make the package public in GitHub Packages if needed. |
| 81 | + |
| 82 | +## Link Policy |
| 83 | + |
| 84 | +Keep links natural and developer-focused. The first README link uses `[RouterBase](https://routerbase.com)`, and package metadata points to the RouterBase homepage. |
0 commit comments