Build, release, and deployment
The build, release, and deployment system turns one pnpm workspace into several user-facing forms of Trilium Notes. It keeps shared versions and build identity aligned, creates desktop, server, web, mobile, container, browser-extension, PDF viewer, and icon-pack artifacts, and publishes them through GitHub Releases, container registries, hosted sites, and extension stores. For the detailed automation path, see Build and release automation. For the targets and their operating needs, see Deployment targets and operations.
Delivery model
The repository has one shared build boundary but several delivery paths. Product code is built from the same workspace graph, then each target receives the form that fits its runtime: a native package, a server archive, a container image, a static web site, a mobile bundle, a browser extension, a PDF viewer asset set, or an icon-pack archive.
flowchart LR
S[Shared workspace and locked dependencies] --> M[Build metadata and version checks]
M --> D[Desktop packages]
M --> A[Server archives]
M --> C[Container images]
M --> W[Web and hosted sites]
M --> B[Mobile bundles]
M --> X[Browser extensions]
M --> P[PDF viewer assets]
M --> I[Icon-pack assets]
D --> R[GitHub release assets]
A --> R
C --> G[GHCR and Docker Hub]
W --> PAGES[Cloudflare Pages]
B --> R
X --> STORES[Extension stores]
P --> W
I --> W
I --> R
The main release workflow is tag-driven. Other workflows build previews or nightly outputs when the related target changes, so a web preview, extension build, or test artifact does not need to wait for a full product release.
Workspace build boundary
The pnpm workspace is the common source of dependencies, commands, and build inputs. Its hoisted dependency layout and shared policy keep local builds, Nix builds, and CI installs close to one another. The workspace allows package updates without an artificial release-age delay and does not fail when the installed pnpm version differs slightly from the declared version. Frozen installs use the reviewed lockfile instead of resolving a new dependency graph. The root package declares pnpm 12.21.0 and uses Node-based preparation steps for shared generated assets. (pnpm-workspace.yaml• L1-12, pnpm-lock.yaml• L1-5, package.json• L60-62, package.json• L101-110)
Workspace-wide overrides keep key shared libraries on compatible versions and replace or omit dependencies that are not needed by the product. Patch records and build permissions also make native or patched package behavior explicit. These rules shape every artifact because each target starts from the same dependency graph. (pnpm-workspace.yaml• L14-110, pnpm-workspace.yaml• L112-147)
Build command surface
The root command surface groups work by product and by cross-cutting concern. This gives local engineers and CI the same high-level entry points without making the root package the owner of each product build. The workspace packages keep their own build entry points, while the root forwards the common client, server, desktop, standalone, mobile, documentation, website, PDF viewer, and release tasks.
| Build concern | Main result |
|---|---|
| Client, server, desktop, and standalone builds | Compiled application parts for native, hosted, or local runtimes. |
| Documentation and website builds | Static sites for the public documentation and project home page. |
| Mobile sync and build commands | Web assets placed into the Capacitor Android and iOS shells. |
| Web clipper build commands | Browser extension archives for Chrome and Firefox. |
| PDF viewer build | Browser viewer files, locale data, and PDF.js runtime assets at the configured viewer paths. |
| Icon-pack builds | Built-in and downloadable font packs with manifests for client and website use. |
| Type, format, lint, and test commands | Checks that shared inputs can support a release build. |
| Preparation commands | Generated or dependent assets needed before an application build. |
| Release maintenance commands | Version files, build identity, packaging metadata, and release notes kept in sync. |
The build graph matters because a shared package can change several artifacts at once. A client or core change may affect the server, desktop app, standalone browser runtime, mobile wrapper, container image, PDF viewer, and generated icon-pack consumers even when only one product package has a direct build command.
Workspace installation also prepares shared runtime assets before a product build. The preparation step keeps the PDF viewer and web clipper outputs available to the commands and workflows that package them. (package.json• L60-62, packages/…/package.json• L5-10)
The icon-pack builder turns provider data into font files, manifests, and zip exports. It can build selected packs by prefix, which lets a generated pack change without rebuilding every other pack. (apps/…/package.json• L1-24, apps/…/index.ts• L69-93)
References: pnpm-workspace.yaml• L1-20 pnpm-workspace.yaml• L112-145 package.json• L8-62 package.json• L101-110 pnpm-lock.yaml• L7-90 apps/…/package.json• L1-17 apps/…/package.json• L1-14 apps/…/package.json• L1-24 apps/…/index.ts• L69-93 apps/…/package.json• L13-24 apps/…/package.json• L13-23
Repository maintenance
Several scheduled or event-driven workflows keep generated data and external build inputs aligned with the workspace. They open reviewable pull requests instead of changing product inputs silently.
- The README sync regenerates docs/README.md from the root README and refreshes the language switcher from Weblate coverage. It runs after changes to the root README or by manual dispatch.
- The model price update refreshes the committed LLM price table from LiteLLM. The application uses the committed table during builds, so builds do not need a live upstream request.
- The PDF.js update moves the package version and the vendored viewer together. It runs unit and browser checks before it opens a pull request.
These workflows make generated files part of a reviewed change. The update is useful only when the source data, generated output, and checks stay in one change. (.github/…/sync-readme.yml• L1-85, .github/…/update-model-prices.yml• L1-53, .github/…/update-pdfjs-viewer.yml• L1-168)
References: .github/…/sync-readme.yml• L1-85 .github/…/update-model-prices.yml• L1-53 .github/…/update-pdfjs-viewer.yml• L1-168
Translation coverage checks
The translation coverage check protects the link between translated content and the locales that the client or website offers. When invoked, it reads Weblate statistics for those projects, uses a one-day local cache, follows every result page, and fails when a language is more than 50 percent translated but is not offered as a user-interface locale; content-only locales do not count as offered.
The check reports all failures in stable order and treats Weblate request errors as failures. Its utility tests protect cache expiry, complete page collection, error reporting, and the distinction between offered and content-only locales. (scripts/translation/check-translation-coverage.mts#L6-L61, scripts/translation/utils.mts#L6-L10, scripts/translation/utils.mts#L25-L36, scripts/translation/utils.mts#L38-L63, scripts/translation/utils.mts#L65-L100, scripts/…/utils.spec.ts• L5-86)
References: scripts/…/check-translation-coverage.mts• L1-61 scripts/…/utils.mts• L6-10 scripts/…/utils.mts• L25-100 scripts/…/utils.spec.ts• L1-86
Continuous integration validation
The development workflow checks shared code before release workflows publish artifacts. It uses path filters to select the server, standalone, and CKEditor suites that a change can affect, while the common checks and Docker image build remain part of the workflow's required validation path. (.github/…/dev.yml• L27-98, .github/…/dev.yml• L99-145, .github/…/dev.yml• L277-376, .github/…/dev.yml• L542-642)
The Docker check builds both main image variants, starts each image, waits for health, and checks that the container runs as a non-root user. The release Docker workflow repeats the important runtime checks before it publishes platform-specific image digests. This separates fast feedback from secret-backed registry publication. (.github/…/dev.yml• L571-642, .github/…/main-docker.yml• L31-118)
The startup request check measures the requests made by both client layouts and compares them with the committed allowlists. It runs for changes that can affect the client, server, shared packages, workspace dependencies, patches, or the measurement skill. Failed runs preserve the captures as an artifact for review. (.github/…/startup.yml• L1-28, .github/…/startup.yml• L37-66)
References: .github/…/dev.yml• L27-98 .github/…/dev.yml• L99-145 .github/…/dev.yml• L277-376 .github/…/dev.yml• L398-531 .github/…/dev.yml• L542-642 .github/…/main-docker.yml• L31-118 .github/…/main-docker.yml• L120-239 .github/…/startup.yml• L1-66
Build identity
Build identity connects a delivered artifact to a source revision and build time. CI writes this information into the shared core before it packages desktop, server, mobile, standalone, or container outputs. Nightly version data adds a date and time so clients and caches can distinguish a nightly from an earlier build made from the same base version.
The root version is propagated to the main product packages and selected shared packages. Tagged releases check the version in the tag against the release-gated package set before any artifact build begins. Stable Android builds also turn the root semantic version into an ordered Google Play versionCode; beta and release-candidate codes sort below their final release while staying within the store limit. (scripts/update-build-info.mts#L4-L21, scripts/update-version.ts• L26-35, scripts/check-version-consistency.ts• L13-35, scripts/android-version-code.mts#L15-L43, apps/…/package.json• L1-4, apps/…/package.json• L1-4, apps/…/package.json• L1-4, packages/…/package.json• L1-8)
References: scripts/update-build-info.mts• L4-21 scripts/update-version.ts• L26-35 scripts/update-nightly-version.ts• L18-57 scripts/android-version-code.mts• L15-53 scripts/check-version-consistency.ts• L5-35 .github/…/release.yml• L13-33 .github/…/action.yml• L106-125 apps/…/package.json• L1-4 apps/…/package.json• L1-4 apps/…/package.json• L1-4 packages/…/package.json• L1-9
Release streams
Release streams separate stable delivery from fast feedback. A stable tag produces a release with versioned assets. A nightly run produces a rolling prerelease or temporary workflow artifacts, depending on whether the run came from the main repository and branch.
Stable releases
A stable release starts when a v* tag is pushed. The workflow first checks version alignment, then builds desktop packages for supported operating systems and architectures alongside Linux server archives, Android packages, and container images. A final job gathers the assets, converts the matching release note into a GitHub-compatible body, and publishes one GitHub Release.
This flow keeps publication behind the artifact builds. The container path adds a second gate: image platforms must build and pass the shared Docker checks before their digests can form release manifests. The release note is also part of the release contract. Missing overview data, invalid changelog entries, or broken note images stop publication instead of creating an incomplete release. (.github/…/release.yml• L1-7, .github/…/release.yml• L105-216, .github/…/main-docker.yml• L120-239, scripts/release-notes.mts#L261-L305, scripts/release-notes-body.mts#L33-L83)
sequenceDiagram
participant Tag as Version tag
participant Check as Release checks
participant Builds as Target builds
participant Notes as Release note generator
participant Publish as GitHub release
Tag->>Check: Start release
Check->>Builds: Approve versioned build
Builds-->>Publish: Desktop, server, Android, and container assets
Tag->>Notes: Select release range and changelog
Notes-->>Publish: GitHub release body
Publish->>Publish: Publish assets and note
References: .github/…/release.yml• L1-7 .github/…/release.yml• L13-168 .github/…/release.yml• L161-216 .github/…/main-docker.yml• L120-239 .github/…/docker-publish.yml• L16-125 scripts/release-notes.mts• L261-305 scripts/release-notes-body.mts• L33-83
Nightly releases
Nightly delivery provides the newest desktop, server, and Android builds without changing the committed stable version. Main-branch runs in the main repository publish a prerelease named nightly; pull requests and other refs retain their outputs as workflow artifacts for review. Desktop nightlies use the same platform matrix as stable desktop releases, and server nightlies use x64 and arm64 archives.
Nightly versioning replaces a pre-release tag with a short date-based test suffix. For a stable base version it first raises the patch number, so update checks do not offer the stable release as a downgrade. Nightly builds are not a substitute for stable release assets. Their version and signing rules are designed for rapid cache invalidation and early feedback, while stable releases use the tag and the normal release publication path. (.github/…/nightly.yml• L21-25, .github/…/nightly.yml• L34-143, .github/…/nightly.yml• L144-228, scripts/update-nightly-version.ts• L21-40)
References: .github/…/nightly.yml• L1-29 .github/…/nightly.yml• L34-143 .github/…/nightly.yml• L144-228 scripts/update-nightly-version.ts• L4-12 scripts/update-nightly-version.ts• L21-40
Release note generation
Release note generation turns the changes since a previous release into a structured note. It combines closed issues from commits and pull requests with validated .changelog/ entries, credits contributors, records new display languages, and adds compatibility entries when the sync or database version changes.
The same generator can render a stable note, a shorter unreleased nightly body, or a nightly issue announcement. A completed release consumes its changelog entries; a release candidate or beta keeps them in the pre-release area so the final release can list them again. Its tests protect parsing, grouping, compatibility reporting, rendering, and the separation of independently shipped products. (scripts/release-notes.mts#L1-L43, scripts/release-notes.mts#L393-L455, scripts/release-notes.mts#L778-L862, scripts/release-notes.mts#L1076-L1217, scripts/release-notes.spec.ts• L15-139, scripts/release-notes.spec.ts• L196-309)
Pull request and main-branch checks lint changelog entries before release work. A separate workflow reads the short-lived lint artifact and posts or updates a pull request comment only after it confirms that the pull request still points to the checked commit. It treats the artifact as untrusted text and never runs pull request code with the write-capable token. (.github/…/changelog.yml• L1-51, .github/…/changelog-comment.yml• L1-40, .github/…/changelog-comment.yml• L53-125, scripts/release-notes.mts#L1257-L1314)
References: scripts/release-notes.mts• L1-43 scripts/release-notes.mts• L261-343 scripts/release-notes.mts• L393-455 scripts/release-notes.mts• L778-862 scripts/release-notes.mts• L1076-1217 scripts/release-notes.spec.ts• L15-139 scripts/release-notes.spec.ts• L196-309 .github/…/changelog.yml• L1-51 .github/…/changelog-comment.yml• L1-40 .github/…/changelog-comment.yml• L53-125
Target releases
Some outputs have their own release cadence because they are separate products or distribution channels. The web clipper uses web-clipper-v* tags and produces Chrome and Firefox archives. Stable tags submit those archives to the Chrome Web Store and Firefox Add-ons, while release candidates publish their release assets and sign the Firefox package without submitting it to the stores. A published main application release can trigger the WinGet workflow, which submits the Windows package to the package catalog. (.github/…/web-clipper.yml• L1-16, .github/…/web-clipper.yml• L68-155, .github/…/release-winget.yml• L1-24)
Stable application releases also prepare the Flathub repository. The workflow updates the external manifest and offline sources from the release tag, validates the app metadata, and opens a pull request for Flathub review. It skips prereleases and web clipper releases; manual runs can instead package a selected ref as a test build. (.github/…/release-flathub.yml• L1-18, .github/…/release-flathub.yml• L20-58, .github/…/release-flathub.yml• L63-95)
References: .github/…/web-clipper.yml• L1-16 .github/…/web-clipper.yml• L31-105 .github/…/web-clipper.yml• L106-155 .github/…/release-winget.yml• L1-24 .github/…/release-flathub.yml• L1-18 .github/…/release-flathub.yml• L20-58 .github/…/release-flathub.yml• L63-95
Packaging utilities
Packaging utilities assemble compiled code, shared assets, native modules, and runtime files into forms that a target can run. They also remove development-only material and apply the target's signing or compatibility rules before an artifact is handed to a release workflow.
Desktop packaging
The desktop build combines the shared server and client behavior with the Electron shell. Electron Forge then turns that assembled application into platform packages. The supported desktop package families are Windows installers and archives, macOS disk images and archives, and Linux Debian, RPM, Flatpak, and AppImage packages.
Linux builds cover x64 and arm64. macOS and Windows builds cover x64 and arm64. macOS artifacts can be signed and notarized, while Linux RPM artifacts receive a package signature. The same packaging action verifies the signed macOS outputs before upload. (.github/…/action.yml• L1-19, .github/…/action.yml• L21-115, .github/…/action.yml• L117-212, apps/…/forge.config.ts• L37-183)
References: .github/…/action.yml• L1-19 .github/…/action.yml• L65-115 .github/…/action.yml• L117-212 apps/…/forge.config.ts• L37-183 apps/…/build-appimage.sh• L1-16
Server packaging
The server package is a self-contained Linux archive. It contains the built server, the matching Node runtime, and a small launcher so an operator can run the server without a separate Node installation. Stable and nightly workflows publish x64 and arm64 tar.xz archives.
The build keeps native SQLite support compatible with the target system. Current images and archives use the matching prebuilt native module where possible, while legacy targets compile it for older or 32-bit ARM environments. This distinction is a portability choice, not a separate server feature. (.github/…/action.yml• L20-41, apps/…/build-server.sh• L25-59)
References: .github/…/action.yml• L11-41 apps/…/package.json• L13-24 apps/…/build-server.sh• L25-59 scripts/build-utils.ts• L243-293
Container packaging
The server also ships as container images for self-hosted deployment. The Docker workflow first builds Alpine and standard images and runs them through health checks, browser checks, and a non-root check. Only after that gate does the main repository build platform-specific images and publish their digests to GitHub Container Registry. A reusable publication workflow verifies those digests, creates multi-architecture manifests, and copies the public tags to Docker Hub. (.github/…/main-docker.yml• L31-118, .github/…/main-docker.yml• L120-239, .github/…/docker-publish.yml• L16-117)
The published image set includes Alpine and Debian-based variants plus legacy images for older ARM targets. Rootless variants run the server as a configurable non-root user. Branch, tag, and commit tags preserve traceability for other builds. Stable version tags also receive stable and latest aliases. The publication workflow mirrors stable images to the pre-rename Docker Hub repositories so existing installs continue to receive updates. (.github/…/main-docker.yml• L1-29, .github/…/main-docker.yml• L120-239, .github/…/docker-publish.yml• L50-125, .github/…/mirror-legacy-docker.yml• L1-74)
References: .github/…/main-docker.yml• L1-29 .github/…/main-docker.yml• L31-118 .github/…/main-docker.yml• L120-239 .github/…/docker-publish.yml• L16-125 .github/…/mirror-legacy-docker.yml• L1-74 apps/…/Dockerfile• L8-25 apps/…/Dockerfile.alpine• L9-23 apps/…/Dockerfile.rootless• L4-38 apps/…/Dockerfile.alpine.rootless• L4-42 apps/…/Dockerfile.legacy• L1-47
Icon-pack packaging
The icon-pack builder creates font assets with manifests that describe their icon names and metadata. It writes downloadable packs for the website and writes selected built-in assets into the client and core paths used by the application.
The builder supports named providers and can build only the requested prefixes. This separates generated font content from the release workflows while still making the outputs part of the workspace build inputs. (apps/…/index.ts• L28-64, apps/…/index.ts• L69-123, apps/…/provider.ts• L3-18)
References: apps/…/package.json• L1-24 apps/…/index.ts• L17-24 apps/…/index.ts• L28-64 apps/…/index.ts• L69-123 apps/…/provider.ts• L3-18 pnpm-lock.yaml• L539-598
Application icon assets
Application icon assets keep the desktop, server, mobile, and browser-facing forms of the product visually aligned. The icon asset tool starts from the shared SVG sources and produces the target-specific images that packaging and installed applications load. (scripts/…/create-icons.sh• L20-23, scripts/…/create-icons.sh• L25-91, scripts/…/create-icons.sh• L108-129)
The same generation path covers macOS and Windows package icons, server icons, Android launcher layers, the iOS app icon, and the web app home-screen icon. It requires ImageMagick, Inkscape, and icnsutil, so a source icon change is incomplete until the generated target assets are refreshed. (scripts/…/create-icons.sh• L5-17, scripts/…/create-icons.sh• L35-86, scripts/…/create-icons.sh• L131-171)
References: scripts/…/create-icons.sh• L5-23 scripts/…/create-icons.sh• L25-91 scripts/…/create-icons.sh• L93-129 scripts/…/create-icons.sh• L131-171
PDF viewer assets
The PDF viewer build packages the browser viewer with the PDF.js resources that it needs at run time. It also carries the supported locale set and applies the package version to resource URLs so browsers can separate updated viewer assets from cached files.
The asset check builds the viewer before comparing its configured resource directories with the declared PDF.js package. This protects the handoff between the dependency version, the viewer output, and the files served by application targets. The viewer package currently tracks PDF.js 6.5.438 and exposes build, update, unit-test, and browser-test commands for that boundary. (packages/…/build.ts• L20-60, packages/…/package.json• L3-19, scripts/pdfjs-build.spec.ts• L8-30)
The PDF.js maintenance workflow owns the full update boundary. It updates the dependency and lockfile, re-vendors the matching viewer, runs unit and browser checks, and opens one pull request with the related files. This prevents a dependency update from leaving the viewer and its runtime library on different versions. (.github/…/update-pdfjs-viewer.yml• L1-18, .github/…/update-pdfjs-viewer.yml• L54-92, .github/…/update-pdfjs-viewer.yml• L156-168)
References: packages/…/package.json• L1-20 packages/…/build.ts• L20-60 packages/…/build.ts• L84-109 scripts/pdfjs-build.spec.ts• L8-30 .github/…/update-pdfjs-viewer.yml• L1-18 .github/…/update-pdfjs-viewer.yml• L54-92 .github/…/update-pdfjs-viewer.yml• L156-168
Cross-platform assembly
The shared build helper gives server and desktop packaging a common way to create a clean output, bundle backend code, assemble frontend assets, copy runtime resources, and keep a build record for each backend entry point. It supports CommonJS and code-split ES module output for different runtime boundaries. It selects native database files by the target platform and architecture, keeps the Linux variant needed by container images, and fails when the required native file is missing. This makes cross-platform packaging errors visible during the build instead of at first launch. (scripts/build-utils.ts• L6-19, scripts/build-utils.ts• L40-157, scripts/build-utils.ts• L168-214, scripts/build-utils.ts• L216-293)
References: scripts/build-utils.ts• L6-19 scripts/build-utils.ts• L40-157 scripts/build-utils.ts• L168-214 scripts/build-utils.ts• L216-293 apps/…/build.ts• L7-40
Deployable application targets
Each application target turns the shared product into a form that matches its environment. The target determines whether the result is installed on a computer, started as a server, loaded by a browser, wrapped by Capacitor, published as a container, or installed as a browser extension.
Hosted web targets
The standalone app is a static browser deployment. Its build includes the client and browser database runtime, then Cloudflare Pages serves the resulting directory at the public app address. Pull requests can receive preview deployments, while main-branch builds deploy the production site when the run is in the main repository.
The workflow runs for client, standalone, core, or workflow changes and builds from the locked workspace before it passes apps/standalone/dist to the Cloudflare Pages action. (apps/…/package.json• L7-14, .github/…/deploy-app.yml• L3-24, .github/…/deploy-app.yml• L44-74)
Pull request previews use a split build-and-publish path. An untrusted pull request uploads static files without deployment secrets, then a trusted workflow downloads that artifact, confirms that its recorded pull request still points to the built commit, rejects Cloudflare server-side entry points, and publishes one preview per current branch. Newer builds cancel older preview deployments, which prevents stale output from replacing a current preview. The trusted workflow executes only the downloaded static output and does not check out or run pull request code. (.github/…/cloudflare-preview.yml• L1-7, .github/…/cloudflare-preview.yml• L31-47, .github/…/cloudflare-preview.yml• L50-126)
The documentation site and project website follow the same broad static-site pattern. Their workflows build only the related site and deploy its output to separate Cloudflare Pages projects. The project website deploys from the main or stable branches and from published application releases, while pull requests use the same artifact-based preview path. (.github/…/deploy-docs.yml• L30-78, .github/…/website.yml• L1-64)
References: apps/…/package.json• L1-14 .github/…/deploy-app.yml• L3-24 .github/…/deploy-app.yml• L44-74 .github/…/cloudflare-preview.yml• L1-176 .github/…/deploy-docs.yml• L30-78 .github/…/website.yml• L1-64 apps/…/package.json• L1-25 apps/…/package.json• L1-25
Mobile targets
The mobile app reuses the standalone web build as its web directory, then Capacitor places that content inside native Android and iOS projects. Android CI can create an unsigned debug APK for checks, a signed nightly APK for distribution, or a stable signed APK and Google Play App Bundle. iOS CI currently creates an unsigned simulator app archive for smoke tests and artifact download.
Mobile output therefore has two roles: a native wrapper for the browser runtime and a release artifact with platform-specific signing. Stable Android publication also needs an ordered version code derived from the root version. It does not use the desktop or server packaging path. (apps/…/package.json• L1-14, .github/…/action.yml• L6-12, .github/…/action.yml• L52-125, .github/…/mobile.yml• L31-91)
References: apps/…/package.json• L1-14 .github/…/action.yml• L6-12 .github/…/action.yml• L52-125 .github/…/mobile.yml• L31-91 scripts/android-version-code.mts• L18-43
Nix targets
The Nix flake provides reproducible installable packages for the desktop app, server, documentation builder, and documentation editor. It supplies the pinned Node and pnpm toolchain and can build the exact Electron binary required by the desktop package when nixpkgs does not provide that version.
The flake is a packaging route alongside GitHub Actions. Its Electron selection stays aligned with the desktop dependency: the flake uses a matching nixpkgs package when available and otherwise checks its pinned Electron package against the desktop version. When the desktop dependency changes on main, the Electron update workflow refreshes the pin, verifies both the binary and headers with Nix, and opens a pull request. (flake.nix#L28-L84, flake.nix#L84-L115, flake.nix#L175-L246, flake.nix#L297-L409, .github/…/update-nix-flake.yml• L1-93)
References: flake.nix• L28-84 flake.nix• L84-115 flake.nix• L148-194 flake.nix• L297-409 .github/…/update-nix-flake.yml• L1-93 package.json• L37-57
Change checklist
When these files or sections are changed, remember to consider these:
- Change the root version with every package checked by the release gate. Confirm that the release tag, generated artifact names, and stable Android version code use the same version.
- Change a shared package or workspace dependency with every affected target workflow. The server, desktop, standalone, mobile, Docker, and web clipper paths do not all run from the same trigger list.
- Change a package manifest's build, package, or preparation script with the root forwarding command and the workflow that consumes its output. A valid workspace install does not prove that the expected artifact still exists.
- Change the development workflow's path filters with the test suites that consume the changed workspace package. A missing filter can leave a required validation suite green without running.
- Change startup request behavior or allowlists with .github/…/startup.yml and its path filters. The check must measure both layouts against the intended baseline.
- Change Docker build or runtime inputs with both the development image checks and the release matrix. The release path must not publish an image that the development path does not exercise.
- Change Electron with the desktop package, Forge packaging inputs, and the matching Nix version selection. Do not leave the flake with a different Electron version.
- Change a workspace override, ignored optional dependency, patch, build permission, release-age setting, or pnpm version policy with both pnpm-workspace.yaml and the matching entries in pnpm-lock.yaml where the lockfile records them. Frozen CI and Nix dependency fetches depend on the two files agreeing.
- Change the declared pnpm version or workspace install policy with local setup guidance and every CI or Nix job that installs dependencies. Keep the root declaration and package-level declarations intentional; apps/…/package.json has its own pnpm declaration.
- Change native SQLite support with the archive, desktop, standard container, Alpine container, and legacy ARM paths. Each path has a different runtime compatibility boundary.
- Change an output directory or artifact name with the upload, release, registry, store, or Cloudflare deployment step that consumes it.
- Change the PDF.js dependency or viewer resource path with the PDF viewer build, the vendored viewer update workflow, and its asset check. The generated resource directories and versioned URLs must remain aligned.
- Change the release note template, changelog fields, or issue classification rules with the stable release workflow, the nightly note path, and the changelog lint and comment workflows. Keep overview validation, compatibility entries, and independently shipped products consistent.
- Change a Cloudflare preview producer with its artifact metadata and trusted publish step. Keep commit validation, server-side entry-point rejection, branch concurrency, and preview comments aligned.
- Change the README source or Weblate locale threshold with the README sync workflow and both generated README bases. A translation base can otherwise drift from the root README.
- Change the committed model price table or its upstream source with the scheduled update workflow. Keep the build dependent on the reviewed file rather than on a live network request.
- Change icon-pack providers, manifests, or generated output paths with both the font files and the client or website metadata that loads them.
- Change application source SVGs or generated icon paths with the desktop, server, mobile, and web assets that consume them. Refresh all target formats from the same source set.
- Change signing or notarization inputs with the platform matrix and artifact verification steps. A build can compile successfully but still fail as a distributable package.
- Change translation locale lists or Weblate coverage rules with the cache, pagination, and content-only locale handling in the translation check. A translated language can otherwise pass the build but remain unavailable or incorrectly offered.
- Change web clipper archive names or store submission inputs with both the release-candidate signing path and the stable store publication path. The two paths intentionally publish different artifacts.
- Change Docker tag rules or legacy repository names with the manifest merge and mirror workflow. Existing installs depend on the stable aliases and the compatibility repositories.
- Change desktop release metadata or Flatpak source generation with the Flathub update workflow. The external manifest, offline sources, and AppStream metadata must describe the same tagged build.
- Change Android version parsing or the stable mobile build contract with
scripts/android-version-code.mts, its tests, and the Gradle inputs. Store ordering depends on the code remaining monotonic and within the platform limit. - Change the pull request lint artifact format or its producer with changelog-comment.yml. The write-capable comment job must continue to validate the pull request head before it trusts the artifact.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A release tag differs from a release-gated package version | The stable release stops before target builds start. | The release sanity job runs the version consistency check. |
A stable Android version cannot map to a valid ordered versionCode | The Play upload can be rejected or a newer build can sort below an older one. | The version-code utility rejects unsupported versions and the stable mobile action uses its result. |
| A changed workspace package is missing from a development path filter | The related validation suite can report success without running. | The development workflow maps shared package closures to the server, standalone, and CKEditor suites. |
| A startup request change is not covered by the startup workflow paths or allowlists | A layout can add requests without the intended CI check reporting the change. | The startup workflow filters relevant changes and checks both layouts against their allowlists. |
| A packaged native SQLite module does not match its target platform or libc | The server or desktop artifact fails when it starts. | Build helpers retain the target native file and CI builds the required legacy or Alpine paths separately. |
| A release artifact is written outside the path consumed by its workflow | The build may pass but publication fails with no matching files. | Upload steps use explicit artifact directories and fail on unmatched files. |
| A stable container build produces one platform digest but not the full matrix | The published tag lacks a supported architecture or the manifest merge fails. | CI verifies every digest on GHCR before it creates and copies multi-architecture manifests. |
| A Docker change bypasses the test job or the main-repository publish guard | A broken image can reach a registry, or an untrusted repository can attempt a secret-backed publish. | The Docker workflow tests both primary image variants first and limits publishing to the main repository. |
| A workspace override, ignored optional dependency, patch, build policy, or install policy is changed without a matching lockfile update | Frozen installs fail or resolve a different dependency graph from the reviewed one. | The workspace policy and lock file record the same dependency decisions. |
| A generated icon-pack font and its manifest are built from different inputs | The client or website can show missing icons or use the wrong glyph names. | The builder creates the font and manifest as one pack and checks the configured prefix before writing it. |
| A source application icon changes without refreshed target assets | One target can show an old or invalid icon while another uses the new source. | The icon tool regenerates desktop, server, mobile, and web formats from the shared SVG inputs. |
| A PDF.js package changes without re-vendoring or checking the viewer resources | The viewer can request missing, stale, or incompatible runtime files. | The update workflow moves the dependency and viewer together, then runs unit and browser checks. |
| A nightly Android build lacks all signing inputs | The nightly APK is not produced. | The mobile build action checks every keystore value before the release assembly. |
| An Electron dependency moves without the matching Nix version and hashes | Nix evaluation or the flake refresh check rejects the build. | The Electron update workflow refreshes and builds the pinned binary and headers. |
| A hosted static build writes to a directory different from the deploy action input | The deployment publishes an empty or stale site. | Each deployment workflow names and validates its build output before deployment. |
| Preview metadata names a pull request that is no longer at the built commit | A stale or unrelated build could be published to a pull request preview. | The trusted preview workflow compares the metadata's pull request head SHA with the triggering build SHA. |
| A preview artifact contains Cloudflare server-side entry points | Pull request-controlled code could run in the Pages environment with deployment bindings. | The publish workflow rejects functions, _worker.js, and _routes.json before it calls Wrangler. |
| Weblate returns only the first page of language results | A translated language can be missed by the coverage gate. | The translation utility follows each next page and counts the results it reads. |
| A translation cache is expired or stamped in the future | The check can use stale coverage data or skip a needed Weblate request. | Cache freshness requires a non-negative age below one day. |
| A release note has no overview or has invalid changelog frontmatter | Stable publication stops or the note omits the intended change. | The release note generator validates entries and requires one overview before it writes the final note. |
| A changelog lint artifact claims a pull request that moved after the lint run | A comment can report old problems on a newer pull request revision. | The comment workflow compares the artifact's pull request head with the lint run's head SHA before posting. |
| A web clipper tag or store artifact is missing its expected archive | The extension release or store submission fails after the build. | The workflow rebuilds the Firefox output from the source archive and uses fail-on-unmatched-files for release assets. |
| A Docker manifest is copied without all source digests or a legacy mirror target is wrong | A registry tag can miss an architecture or existing users can stop receiving updates. | Publication verifies GHCR digests before manifest creation and checks each legacy copy with crane manifest. |
| A README sync runs on stale source data or races with another run | The translation base can describe an older root README or lose a newer regeneration. | The workflow runs from the main repository and cancels older runs before it opens the review PR. |
| A Flathub update uses a bad source ref or invalid app metadata | The external packaging pull request cannot build or should not enter review. | The workflow resolves the selected ref, generates offline sources, and validates AppStream metadata. |
Key files
| File | Why to read it |
|---|---|
| pnpm-workspace.yaml and pnpm-lock.yaml | Define the shared package boundary, dependency policy, and locked dependency graph. |
| package.json and the product package manifests | Show the root build surface and the package-level build, package, test, and version contracts. |
scripts/update-version.ts, scripts/update-nightly-version.ts, scripts/android-version-code.mts, and scripts/update-build-info.mts | Explain how release versions, Android store ordering, and build identity reach artifacts. |
| scripts/check-version-consistency.ts | Defines the stable release version gate. |
scripts/translation/check-translation-coverage.mts, scripts/translation/utils.mts, and scripts/…/utils.spec.ts | Show the Weblate coverage gate and the rules that keep locale data complete and fresh. |
| .github/…/dev.yml and .github/…/startup.yml | Show affected-suite checks, Docker validation, and startup request validation used before publication. |
| .github/…/release.yml | Shows the stable release fan-out, artifact collection, Android packages, and GitHub publication path. |
| .github/…/nightly.yml | Shows the rolling desktop, server, and Android nightly paths. |
scripts/release-notes.mts, scripts/release-notes.spec.ts, and scripts/release-notes-body.mts | Show how release changes become stable and nightly notes, including compatibility and changelog rules. |
| .github/…/changelog.yml and .github/…/changelog-comment.yml | Show changelog validation and the safe pull request feedback path. |
| .github/…/action.yml and apps/…/forge.config.ts | Show the supported desktop package families and signing boundary. |
| .github/…/action.yml and apps/…/build-server.sh | Show how the portable server archive is assembled. |
.github/…/main-docker.yml, .github/…/docker-publish.yml, .github/…/mirror-legacy-docker.yml, and apps/server/Dockerfile* | Show image validation, architecture coverage, manifest publication, legacy mirroring, and rootless variants. |
| scripts/build-utils.ts | Shows the shared assembly rules used by packaged applications. |
| scripts/…/create-icons.sh | Shows how shared SVG sources become platform icons for desktop, server, mobile, and web targets. |
| apps/…/package.json and apps/…/index.ts | Show the generated icon-pack inputs, output forms, and selective build boundary. |
| packages/…/package.json, packages/…/build.ts, and scripts/pdfjs-build.spec.ts | Show the PDF viewer asset build and the check that its PDF.js resources match the dependency. |
| .github/…/update-pdfjs-viewer.yml | Shows the reviewed dependency, vendored viewer, and browser-check update path. |
| .github/…/web-clipper.yml and .github/…/release-flathub.yml | Show browser extension distribution and the Flathub packaging handoff. |
| .github/…/deploy-app.yml, .github/…/deploy-docs.yml, .github/…/website.yml, and .github/…/cloudflare-preview.yml | Show the static-site build outputs, Cloudflare Pages targets, and trusted pull request preview path. |
| .github/…/sync-readme.yml and .github/…/update-model-prices.yml | Show how generated README and model price data stay reviewable and current. |
| .github/…/action.yml and .github/…/mobile.yml | Show the Android and iOS bundle paths and their signing contracts. |
flake.nix and .github/…/update-nix-flake.yml | Show the reproducible Nix packages and Electron version contract. |