How a change gets from a branch to loop.goodone.si and to npm. The workflows are in .github/workflows/.
branch → pull request → CI → merge to main → CI → Deploy (migrate, then deploy)
→ Release (CLI to npm, only when pnpm bump changed the version)
- Work on a branch. One feature per pull request, one feature per commit.
- Open a pull request. CI runs typecheck, tests and the build.
- Merge with squash once CI passes.
maintakes no direct pushes and no merges with a failing CI.
Merging deploys. When CI passes on main, Deploy runs for that exact commit:
- Applies database migrations to the production database.
- Deploys the App Worker and the dispatcher container.
- Checks that
https://loop.goodone.sianswers.
The GitHub production environment lists every deploy and its commit, so what is live is always one click away.
Migrations run before the new code is live, and so must also suit the code that is live until then:
- Add a column, table or index in one release. Make it nullable or give it a default.
- Stop reading an old column in that release; drop it in a later one.
- Never rename in place. Add the new one, copy, switch, and drop the old one later.
Release a new CLI when the runner or the loopable command changed. A service-only change needs no release.
- In the pull request,
pnpm bump minor(orpatch,major, an exact version). It commits the new version. - Merge it. Once its deploy has finished, Release runs by itself: it checks, builds, publishes the version in
package.jsonto npm through trusted publishing, tagsvX.Y.Z, and writes the release notes. It never pushes tomain.
Release waits for the deploy, so the service always knows about a new runner before any runner is out. A merge that did not change the version publishes nothing. A Deploy run by hand, which may be a rollback, never releases.
If a release fails, fix it in a pull request, or run Release from the Actions tab once the cause is gone. By hand it refuses unless main is the commit that is deployed and its version is not on npm yet.
Runners on 0.7.0 or later can then be updated from the Runners page.
- The service: run Deploy by hand with
refset to the last good commit or tag. Migrations are not undone, which is why they only ever add. - Faster, for the App Worker alone:
npx wrangler rollbackfrom a checkout signed in to Cloudflare. - The CLI: publish a fixed version. Never unpublish: runners may already have it.
| Where | Name | For |
|---|---|---|
| Repository | CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID |
Deploying to Cloudflare |
| Environment production | LOOPABLE_DATABASE_URL, LOOPABLE_DATABASE_AUTH_TOKEN |
Migrating before a deploy |
The Worker (scripts/hosting-secrets.sh) |
Database, master key, OAuth apps | The running service |
| npm | none | Trusted publishing from release.yml |