gon publish

Promote an existing local module at src/{Name}/ to a full rozklad/gon-{kebab} package on GitHub. Complement to gon make:module — use it when a module was scaffolded without --no-repo earlier, or when it started as a draft in src/ and now deserves its own repo.

Usage

gon publish Admissions # Tag derived from module.json version
gon publish Admissions --tag=v1.2.0 # Explicit tag override
gon publish Admissions --commit-message="Initial extract" # Custom initial commit message
gon publish Admissions --public # Public GitHub repo
gon publish Admissions --org=rozklad # Under an org
gon publish Admissions --use-existing # Reuse remote if it already exists
gon publish Admissions --skip-push # Git init + attach remote, don't push
gon publish Admissions --skip-checksum # Don't baseline the module in .gon/module-checksums/

What happens

  1. git init -b main in src/{Name}/.
  2. git add . + initial commit.
  3. Creates rozklad/gon-{kebab} on GitHub (private by default).
  4. Adds remote + pushes main.
  5. Tags v{version-from-module.json} + pushes tag.
  6. Writes .gon/module-checksums/{Name}.json baseline.

Refuses to run if src/{Name}/.git already exists — won't overwrite history.

After publish

  • Add the module to the project's gon.json requires: "{kebab}": "^{version}".
  • Refresh the registry cache: gon search --refresh.
  • Bump + retag later: edit src/{Name}/module.json version, commit in the module repo, git -C src/{Name} tag vX.Y.Z && git -C src/{Name} push origin vX.Y.Z.