Release Packaging Formats

mandatory

Formatos canônicos de pacote por plataforma (.deb, .rpm, .apk, .AppImage, .kpkg, .msi, .dmg). Regras de publicação, naming dos assets com nome fixo, conteúdo mínimo. Distinto de `policies/releases.kmd` (workflow de release) e `specs/kpkg/format.kmd` (formato do .kpkg).

Spec — Release Packaging Formats

Applicability

Every Koder product that produces distributable artifacts (desktop, mobile, server, library). Applies to the release flow triggered by /com_rel_syn_dpl and friends.

Format Hierarchy

Priority Format Channel Notes
*rimary* .kpkg Koder Hub Universal bundle; one file, all platforms. Produced by kpkg build.
Secondary .deb / .rpm / .AppImage / .Flatpak Linux distros For users who don't use Koder Hub.
Secondary .msix / .msi Windows Required for Flutter desktop; WinRM → s.win.local.
Secondary .pkg / .ipa / .apk macOS / iOS / Android Platform stores.
Legacy tar.gz Direct download Accepted for apps not yet producing .kpkg; will be deprecated.

*ule:*every Flutter desktop app *ust*produce a .kpkg via kpkg build --from-bundle in addition to any secondary formats. The .kpkg is what khub install downloads by default; secondary formats are for external channels only.

Required Formats

When generating a release, produce packages for *ll applicable formats*from this list:

Format Target Build Tool Host Requirement
deb Ubuntu, Debian, Mint dpkg-deb Linux
rpm Fedora, Red Hat, SUSE rpmbuild Linux
Flatpak Linux (sandboxed) flatpak-builder Linux
Snap Linux (Canonical) snapcraft --destructive-mode Linux
AppImage Linux (portable) appimagetool Linux
MSIX Windows 10/11 (Flutter desktop apps) dart run msix:create WinRM → s.win.local ou k.win
MSI Windows (Go CLIs / instaladores simples) wixl (msitools) Linux (cross-build OK)
BAT DOS shell any
app macOS Application Bundle Xcode macOS
pkg macOS Installer Package pkgbuild macOS
ipa iOS App Store Package Xcode macOS
apk Android Gradle / Flutter any

Rules

  1. *kip nonapplicable formats*— do not build an apk for a desktoponly program.
  2. *kip formats the host cannot produce AND cannot install the tools for*— e.g., ipa without macOS. If the tool can be installed on Linux (snapcraft, flatpak-builder, wixl, appimagetool), install it and generate the package — do not skip.
  3. *SIX obrigatório para Flutter desktop*— todo módulo Koder que tenha app/desktop/ (Flutter desktop) **cujo koder.toml liste "windows" em platforms, ou que possa vir a ter UI Windows (produto com usuário final, mesmo sem o diretório ainda), *eve*gerar .msix em toda release. Usar dart run msix:create via WinRM → s.win.local ou k.win. Ver policies/windows-builds.kmd §2 para o fluxo completo. Não pular este formato alegando "não há máquina Windows disponível" — sempre delegar para a VM.
  4. *very commit gets a release*— when the user asks to "commit" (via /com_rel_syn_dpl), always generate a release with all applicable packages after committing.
  5. *ublic packages, private repos*— all Koder repositories remain *rivate* Public download of release assets is controlled by two repo-level flags:
    • public_releases=true — enables anonymous download of release assets
    • public_binaries_only=true — restricts to the Flow binary allowlist: .deb, .rpm, .apk, .aab, .appimage, .snap, .flatpak, .msi, .exe, .dmg, .pkg, .ipa, .bin, .7z, .zip, .tar.xz, .tar.zst, .tar.bz2
    • Source .tar.gz auto-generated by Flow remain *rivate*
    • Enable once per repo via:
      PATCH /api/v1/repos/{owner}/{repo}
      {"public_releases": true, "public_binaries_only": true}
    • After enabling, all binaries of all past and future releases are anonymous-downloadable automatically
    • *o not*use PATCH .../assets/{id} with is_public:true — that field does not exist in the Flow schema and is silently ignored
    • *o not*create separate *-releases repositories
  6. *atest alias*— after creating a release, ensure Koder Flow has the /releases/latest shortcut pointing at the newest release. The URL https://flow.koder.dev/{owner}/{repo}/releases/latest must always redirect to the latest release. Gitea/Forgejo supports this natively — do not disable.
  7. *ixedname assets for permanent downloads*— when uploading assets, *lways upload two copies of each artifact* one with the versioned name (e.g. `vivveridv1.0.9.apk) and one with **the fixed, unversioned name** (e.g. vivverid.apk). This lets the URL https:/low.koder.dev{owner}{repo}releasesdownloadlatest{fixedname}` work as a permanent link always pointing at the latest artifact. Fixedname pattern: {product-name}.{ext}. When telling the user URLs, prefer the /latest/ URL with the fixed name.

Public URLs

  • *ecommended (readable)* https://flow.koder.dev/{owner}/{repo}/releases/download/{tag}/{file} — the handler RedirectDownloadPublic is outside RepoAssignment and works anonymously.
  • *lternative (top-level attachment)* https://flow.koder.dev/attachments/{uuid} — also anonymous.
  • *ackup mirror* dl.koder.dev served from /var/www/dl.koder.dev/ on s.k.lin by koder-jet — available as a fallback if you don't want to depend on Flow.

Commit Flow Integration

The /com_rel_syn_dpl skill is the canonical way to commit + release + sync + deploy in one step. It enforces rules 1–6 automatically.

Source: ../home/koder/dev/koder/meta/docs/stack/specs/releases/packaging.kmd