Releasing
What a release contains and how the container image is built.
View source on GitHubiglo.base docs 7 of 8
On this page
iglo.base ships one compiled executable per platform: linux-x64 and linux-arm64 (D24, D3, D35). There is no macOS or Windows build; releases 1.0.0 and 1.1.0 keep the archives they were published with.
.github/workflows/release.yml builds each on a runner of its own platform.
How to release
- Run
bun run checkandbun run test:referenceon the host (D25) from the commit to release. - Tag that commit and push the tag:
git tag v0.1.0 && git push origin v0.1.0. The tag must bevMAJOR.MINOR.PATCHwith an optional-prereleasesuffix; the workflow fails on anything else. - The workflow builds with the version from the tag on two runners (
ubuntu-latest,ubuntu-24.04-arm), smoke-tests each executable on its own platform (--versionprints the tag’s version,serveon a temporary directory answers/api/healthwith 200), archives them, writes oneSHA256SUMSand creates a draft GitHub release. The linux-x64 job also runsbun run check. Tags with a-suffix are marked as pre-releases.test:referenceis not part of the workflow (it takes over 10 minutes); it is the manual step 1 for linux-x64. For linux-arm64 start the on-demand CI workflow before tagging (gh workflow run ci.yml --ref <branch>): its jobcheck-linux-arm64runsbun run checkandbun run test:referencenatively. - Review the draft and publish it by hand. Nothing is public until then.
workflow_dispatch is a dry run, also when it is started on a tag: it builds and uploads the archive as a workflow artifact (version 0.0.0-dryrun.<run number>) and creates no release.
What it produces
iglo-base_<version>_linux_amd64.zipandiglo-base_<version>_linux_arm64.zip, each containingiglo-base(the executable),LICENSEandREADME.txt(a pointer to the repository).<version>is the tag without the leadingv.iglo.schema.json, the JSON Schema of the schema file (D40), the same file asschema/iglo.schema.jsonin the tagged commit. A schema file names it in its$schemaline.SHA256SUMS, with the SHA-256 checksum of both archives and ofiglo.schema.json.
IGLO_TARGET=bun-linux-arm64 bun run build cross-compiles a linux-arm64 executable on any host; bun-linux-x64 and bun-linux-arm64 are the only targets scripts/build.ts accepts (D35).
The executables are not signed or notarized.
iglo-base --version prints iglo-base version <version>; a build outside the release (plain bun run build) prints iglo-base version (untracked). The version is set at build time: IGLO_VERSION=0.1.0 bun run build (scripts/build.ts passes it to bun build --define and to the dashboard footer).
Image
.github/workflows/docker.yml wraps a published release in one multi-arch image, linux/amd64 and linux/arm64 (D33, D35). It runs when a release is published, and by hand with workflow_dispatch and a tag input (for example v1.0.0) for a release that already exists. It does not build iglo.base: it downloads iglo-base_<version>_linux_amd64.zip, iglo-base_<version>_linux_arm64.zip and SHA256SUMS with gh release download (scripts/docker-context.sh), checks the checksums, and the Dockerfile copies the executable of the image’s architecture into gcr.io/distroless/base-debian13:nonroot (pinned by digest; it must list linux/arm64). Before pushing, each architecture’s image is built and smoke-tested on a runner of that architecture (ubuntu-latest, ubuntu-24.04-arm; no emulation), then one docker buildx build --platform linux/amd64,linux/arm64 --push publishes the manifest. The smoke test: --version prints the version, serve answers /api/health with 200 and docker stop exits 0. The checkout does not keep the job token.
It pushes ghcr.io/iglo-tech/iglo.base:<version> and :latest only when the tag is the repository’s latest published release (gh release view without a tag, never a pre-release), so rebuilding an older release or a patch on an older line does not move it. Only this job has packages: write; there are no other secrets. A draft release is refused.
docker run -d --name iglo -p 8090:8090 -v iglo-data:/pb_data ghcr.io/iglo-tech/iglo.base:1.0.0
-
The executable is
/iglo-baseand the working directory is/, so the defaults “next to the executable” are the volumes, forserveand for every other command, without--dir:/pb_data(data; declared a volume),/pb_migrations(auto-generated migration files that dashboard changes write; declared a volume),/pb_public(static files served at/; mount it, it is not declared) and/pb_hooks(not supported; iglo.base warns when it exists). Mount what you need to keep. If you override the command,serveplus your flags is enough; no path flag is required. -
Run other commands in the running container or as a one-off container; both land on the same volumes:
docker exec iglo /iglo-base superuser upsert [email protected] 'a long password' docker run --rm -v iglo-data:/pb_data ghcr.io/iglo-tech/iglo.base:1.0.0 superuser upsert [email protected] 'a long password' docker run --rm -it -v iglo-data:/pb_data -v iglo-migrations:/pb_migrations ghcr.io/iglo-tech/iglo.base:1.0.0 migrate collectionsThere is no shell in the image, so use the full path
/iglo-basewithdocker exec. -
The process runs as uid/gid 65532 and is PID 1. A new named volume takes that ownership from the image. A directory taken over from PocketBase (usually root-owned) must be handed over first:
chown -R 65532:65532 <dir>with rootful Docker. With rootless Docker or Podman, uid 65532 maps to a host subuid, sochownas the host user does not help; instead run the container with--user 0:0: under rootless Docker the host user who owns the directory is uid 0 inside the container, so this is that user, not host root, and the files stay owned by them. Rootless Podman maps the same way:--user 0:0or--userns=keep-id. This also leaves nothing to change back for a rollback. -
Back up or copy the whole data directory, never only
data.db:-waland-shmfiles remain after a crash or a kill (a clean stop removes them). -
No shell,
wgetorcurlexists in the image, so compose or Kubernetes health checks that exec into the container cannot work. Check/api/healthfrom the host or the reverse proxy instead. -
The image is not an official PocketBase image. Update the digest in the
Dockerfileby hand when the base needs a refresh.
SDK releases
The JavaScript SDK in sdk/ is published independently to npm as @iglo.tech/iglo.base under sdk-v<version> tags (D36). .github/workflows/sdk-release.yml automates releases.
How to release
- In a single PR, bump
"version"insdk/package.jsonand add a new section## <version>insdk/CHANGELOG.mdwith the release notes. - Merging the PR to
maintriggers.github/workflows/sdk-release.yml. - The workflow runs three isolated jobs under least privilege:
check(read-only,contents: read): checks out without persistent credentials (persist-credentials: false), sets up Node 24 and Bun, verifiesnpm --version>= 11.5.1, validates semver, checks git tags viagit ls-remote --exit-code, checks npm registry vianpm view --json(onlyE404is treated as not published; network or server errors fail immediately), extracts non-empty release notes fromsdk/CHANGELOG.md, runs lint, SDK typecheck, SDK unit tests (bun test sdk/test), build (bun run sdk:build), package checks (bun run sdk:check-package), and uploadssdk/distas an artifact (sdk-dist).publish(contents: read,id-token: write): downloads thesdk-distartifact and publishes the exact build withnpm publish --provenance --access public. Plain versions publish under--tag latest; prerelease versions (*-*) publish under--tag next. Every non-prerelease version publishes aslatest; if a patch release is made on an older maintenance line (e.g. 1.0.5 after 1.1.0), it moves thelatesttag unless managed manually withnpm dist-tag. It publishes by OIDC trusted publishing only, with no npm token. If the version is already published on npm, this job is skipped on real runs (on dry runs of an existing version, it runsnpm pack --dry-run).release(contents: write): runs whenpublishsucceeds or was skipped because the version is already on npm. It resolves the commit that was published using the npm registry’sgitHead(npm view @iglo.tech/iglo.base@<version> gitHead), failing on registry errors and falling back to the workflow commit only ifgitHeadis absent. It checks if the git tagsdk-v<version>and GitHub release exist, and creates only what is missing. Prerelease versions create GitHub releases with--prerelease. All SDK releases use--latest=falseso server releases remain latest.
If both @iglo.tech/iglo.base@<version> and tag sdk-v<version> already exist, the workflow exits successfully without republishing. If the git tag exists on remote but npm does not have the version, the workflow fails loudly so the mismatch can be investigated.
Partial failure recovery
If the publish step succeeds on npm but the subsequent tag or GitHub release creation fails (or a runner terminates), the workflow is safely recoverable:
- Re-running the workflow with “Re-run all jobs” (choose “Re-run all jobs”, not only failed jobs, so
checkre-detects that@iglo.tech/iglo.base@<version>is already published on npm rather than reusing a cachednpm_exists=false). - The
publishjob is skipped (preventing npmE403cannot publish over existing version errors). - The
releasejob runs, readsnpm view @iglo.tech/iglo.base@<version> gitHeadto point the tag at the published commit (failing on registry errors, and falling back to the workflow commit only ifgitHeadis absent), and creates the missing git tag and GitHub release with the release notes fromsdk/CHANGELOG.md. - For manual recovery, check the published commit with
npm view @iglo.tech/iglo.base@<version> gitHead, tag it withgit tag sdk-v<version> <commit> && git push origin sdk-v<version>, and rungh release create sdk-v<version> --title sdk-v<version> --notes-file <notes> --latest=false.
Dry run and branch rules
- Manual runs via
workflow_dispatchdefault todry-run: true. - A real publish (
dry-run: false) is only permitted when running onrefs/heads/main; running on any other branch with dry-run off fails early with a clear error. - Running a dry run on an already published version still runs the full build and checks, then runs
npm pack --dry-runwith a notice that the version is already published (because current npm’snpm publish --dry-runfails with exit 1 on existing versions). For an unpublished version, dry run executesnpm publish --dry-run. This allows packaging verification at any time on any branch.
One-time npm setup
The package is @iglo.tech/iglo.base, published under the npm organization iglo.tech (owner decision, 2026-11-12; D36). Releases use npm trusted publishing: OIDC with permissions: id-token: write, no npm token anywhere. npm trusted publishing requires npm CLI >= 11.5.1 and Node >= 22.14.0 (the workflow runs Node 24 with npm 11). The workflow has no token fallback, so a failed OIDC exchange fails the run.
npm requires that the package already exists before a trusted publisher can be configured for it. A newly created trusted publisher configuration must complete its first successful publish within 2 days (48 hours); if it is not validated in that window, it expires and can no longer be used or edited. So the first release is a manual publish, and the trusted publisher is added only when a validating release is ready.
- Create the npm organization
iglo.tech(owner, npmjs.com). The free plan is enough, since the packages are public. - Publish 1.0.0 by hand (owner). From a clean checkout of
main, runbun install --frozen-lockfileat the repository root, thenbun run sdk:build, then fromsdk/runnpm logininteractively (the owner’s own login, with 2FA; no token),npm publish --access public, andnpm logout. The publish has no GitHub Actions provenance attestation; that is accepted for the first version.- Merging P.14 to
mainstartssdk-release.ymlas a real run, because its push trigger fires onsdk/package.json. That run fails at thepublishstep, since no trusted publisher exists yet (OIDC token exchange,ENEEDAUTH). That red run is expected. Do not work around it; step 3 completes it.
- Merging P.14 to
- Re-run that run (owner). After the manual publish, open the failed run on
mainin Actions and choose Re-run all jobs (not only the failed jobs). A push run is never a dry run, so there is nodry-runinput to set. The check job seesnpm_exists=truewith the git tag missing, skipspublish, and the release job creates thesdk-v1.0.0tag and the GitHub release. If that run is no longer available, run the workflow by hand instead (Actions -> SDK release -> Run workflow, branchmain,dry-rununchecked). - Add the trusted publisher (owner, npmjs.com, package
@iglo.tech/iglo.base-> Settings -> Trusted Publishers -> Add trusted publisher):- Publisher: GitHub Actions
- Organization or user:
iglo-tech - Repository:
iglo.base - Workflow filename:
sdk-release.yml - Environment: leave empty (the workflow uses no GitHub Environment).
- Allowed actions: enable direct publishing (
npm publish). Configurations created after September 3, 2026 allow onlynpm stage publishby default; direct publishing must be enabled explicitly so the automated releases can publish without a maintainer promoting staged versions.
- Validate it with a throwaway prerelease within 2 days. Open a PR that bumps
sdk/package.jsonto a throwaway prerelease such as1.0.1-rc.0, with its notes insdk/CHANGELOG.md, and merge it within 2 days. The workflow publishes it under thenexttag, solateststays at 1.0.0, and the first successful OIDC publish makes the trusted publisher configuration permanent.
If the 2-day window passes without a successful publish, the configuration expires. Subsequent OIDC publishes then fail with ENEEDAUTH. To recover, delete the expired configuration on npmjs.com, add it again with the settings above, and run the validating prerelease within 2 days.
Concurrency and queue behavior
The concurrency group sdk-release specifies cancel-in-progress: false. GitHub Actions retains at most one pending run in queue per concurrency group; if multiple releases merge in rapid succession, GitHub may supersede intermediate pending runs with the latest queued run. The latest run publishes its version. A skipped version cannot be published by workflow_dispatch on its historical commit because real publishes are only permitted on refs/heads/main, which now carries a newer version; to release a superseded version, either bump to a new version on main or, if main itself is at the unpublished version, trigger sdk-release.yml manually via workflow_dispatch on main with dry-run: false. The workflow’s check logic ensures that if an older or re-run workflow executes when the version and tag are already present, it exits cleanly without errors or duplicate tags.
Verifying a download
sha256sum -c SHA256SUMS # in the directory with the files
unzip iglo-base_0.1.0_linux_amd64.zip
./iglo-base --version
Switching a deployment
The operations guide covers installing and running a release. cutover.md is the runbook for moving a PocketBase v0.42.3 deployment to a released executable and back.