Release Packaging Formats
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
- *kip non
applicable formats*— do not build anonly program.apkfor a desktop - *kip formats the host cannot produce AND cannot install the tools for*— e.g.,
ipawithout macOS. If the tool can be installed on Linux (snapcraft,flatpak-builder,wixl,appimagetool), install it and generate the package — do not skip. - *SIX obrigatório para Flutter desktop*— todo módulo Koder que tenha
app/desktop/(Flutter desktop) **cujokoder.tomlliste"windows"emplatforms, ou que possa vir a ter UI Windows (produto com usuário final, mesmo sem o diretório ainda), *eve*gerar.msixem toda release. Usardart run msix:createvia WinRM →s.win.localouk.win. Verpolicies/windows-builds.kmd §2para o fluxo completo. Não pular este formato alegando "não há máquina Windows disponível" — sempre delegar para a VM. - *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. - *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 assetspublic_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.gzauto-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}withis_public:true— that field does not exist in the Flow schema and is silently ignored - *o not*create separate
*-releasesrepositories
- *atest alias*— after creating a release, ensure Koder Flow has the
/releases/latestshortcut pointing at the newest release. The URLhttps://flow.koder.dev/{owner}/{repo}/releases/latestmust always redirect to the latest release. Gitea/Forgejo supports this natively — do not disable. - *ixed
name assets for permanent downloads*— when uploading assets, *lways upload two copies of each artifact* one with the versioned name (e.g. `vivveridv1.0.9.apkid.apk) and one with **the fixed, unversioned name** (e.g.vivver). This lets the URLhttps:/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 handlerRedirectDownloadPublicis outsideRepoAssignmentand works anonymously. - *lternative (top-level attachment)*
https://flow.koder.dev/attachments/{uuid}— also anonymous. - *ackup mirror*
dl.koder.devserved from/var/www/dl.koder.dev/ons.k.linbykoder-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.