Document Forgejo development flow

This commit is contained in:
matamune 2026-05-12 20:22:32 +00:00
parent 647e0d17da
commit 2d6d480f14
Signed by: matamune
GPG key ID: 3BB8E7D3B968A324
5 changed files with 63 additions and 53 deletions

View file

@ -1,23 +1,26 @@
# Development Flow
This monorepo is developed on Codeberg and mirrored to GitHub only for npm trusted publishing.
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.
## Remotes
Use Codeberg as the normal development remote:
Use Forgejo as the normal development remote:
```bash
git remote -v
# origin git@codeberg.org:peezy-tech/codex-flows.git
# github https://github.com/peezy-tech/codex-flows.git
# 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
```
Push ordinary development to Codeberg:
Push ordinary development to Forgejo:
```bash
git push origin main
```
Forgejo should push-mirror `main` to Codeberg. The local `codeberg` remote is kept for diagnostics and manual recovery.
Push to GitHub only when a release needs the trusted publishing workflow:
```bash
@ -26,30 +29,31 @@ git push github main
## Machine Keys
This machine uses a dedicated Codeberg SSH key:
This machine uses dedicated Forgejo and Codeberg SSH keys:
```text
~/.ssh/id_ed25519_jojo_build.pub
~/.ssh/id_ed25519_codeberg.pub
```
The public GPG key for commit verification is exported here:
```text
~/.config/codeberg-keys/matamune-codeberg-gpg.asc
~/.config/forgejo-keys/matamune-jojo-build-gpg.asc
```
Upload both public keys to the Codeberg account before pushing over SSH or expecting verified commits.
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.
## Forgejo CLI
`forgejo-cli` is installed as `fj`.
Authenticate with Codeberg after creating an application token:
Authenticate with `jojo.build` after creating an application token:
```bash
fj auth add-key <codeberg-username> <token>
fj auth use-ssh true
fj auth list
fj --host jojo.build auth add-key <forgejo-username> <token>
fj --host jojo.build auth use-ssh true
fj --host jojo.build auth list
```
If browser login is available, this may also work:
@ -75,10 +79,11 @@ git diff --check
To publish through GitHub trusted publishing:
1. Bump `packages/codex-client/package.json`.
2. Commit and push to Codeberg.
3. Push the same commit to GitHub.
4. Run `.github/workflows/publish-codex-flows.yml` on GitHub with confirmation input `@peezy.tech/codex-flows`.
5. Verify npm:
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:
```bash
npm dist-tag ls @peezy.tech/codex-flows