codex-flows/docs/development-flow.md

91 lines
2.1 KiB
Markdown
Raw Normal View History

2026-05-12 17:09:22 +00:00
# Development Flow
2026-05-12 20:22:32 +00:00
This monorepo is developed on Forgejo at `jojo.build`. Codeberg is a push mirror, and GitHub is used only when npm trusted publishing needs its workflow.
2026-05-12 17:09:22 +00:00
## Remotes
2026-05-12 20:22:32 +00:00
Use Forgejo as the normal development remote:
2026-05-12 17:09:22 +00:00
```bash
git remote -v
2026-05-12 20:22:32 +00:00
# origin git@jojo.build:peezy-tech/codex-flows.git
# codeberg git@codeberg.org:peezy-tech/codex-flows.git
# github https://github.com/peezy-tech/codex-flows.git
2026-05-12 17:09:22 +00:00
```
2026-05-12 20:22:32 +00:00
Push ordinary development to Forgejo:
2026-05-12 17:09:22 +00:00
```bash
git push origin main
```
2026-05-12 20:22:32 +00:00
Forgejo should push-mirror `main` to Codeberg. The local `codeberg` remote is kept for diagnostics and manual recovery.
2026-05-12 17:09:22 +00:00
Push to GitHub only when a release needs the trusted publishing workflow:
```bash
git push github main
```
## Machine Keys
2026-05-12 20:22:32 +00:00
This machine uses dedicated Forgejo and Codeberg SSH keys:
2026-05-12 17:09:22 +00:00
```text
2026-05-12 20:22:32 +00:00
~/.ssh/id_ed25519_jojo_build.pub
2026-05-12 17:09:22 +00:00
~/.ssh/id_ed25519_codeberg.pub
```
The public GPG key for commit verification is exported here:
```text
2026-05-12 20:22:32 +00:00
~/.config/forgejo-keys/matamune-jojo-build-gpg.asc
2026-05-12 17:09:22 +00:00
```
2026-05-12 20:22:32 +00:00
Upload the Forgejo SSH and GPG public keys to the `jojo.build` account before pushing over SSH or expecting verified commits. Keep the Codeberg SSH key available for mirror diagnostics.
2026-05-12 17:09:22 +00:00
## Forgejo CLI
`forgejo-cli` is installed as `fj`.
2026-05-12 20:22:32 +00:00
Authenticate with `jojo.build` after creating an application token:
2026-05-12 17:09:22 +00:00
```bash
2026-05-12 20:22:32 +00:00
fj --host jojo.build auth add-key <forgejo-username> <token>
fj --host jojo.build auth use-ssh true
fj --host jojo.build auth list
2026-05-12 17:09:22 +00:00
```
If browser login is available, this may also work:
```bash
fj auth login
fj auth use-ssh true
```
## Releases
Release package: `@peezy.tech/codex-flows`
Before publishing:
```bash
bun run --filter @peezy.tech/codex-flows release:check
bun run check:types
bun run test
git diff --check
```
To publish through GitHub trusted publishing:
1. Bump `packages/codex-client/package.json`.
2026-05-12 20:22:32 +00:00
2. Commit and push to Forgejo.
3. Confirm the Codeberg mirror has received the commit.
4. Push the same commit to GitHub.
5. Run `.github/workflows/publish-codex-flows.yml` on GitHub with confirmation input `@peezy.tech/codex-flows`.
6. Verify npm:
2026-05-12 17:09:22 +00:00
```bash
npm dist-tag ls @peezy.tech/codex-flows
```