Files
Marcos Paulo 7db396618e
Packaging lint / lint (push) Has been cancelled
ci / ci (macos-latest) (push) Has been cancelled
ci / ci (ubuntu-latest) (push) Has been cancelled
ci / ci (windows-latest) (push) Has been cancelled
feat(release): packaging for macOS, Windows and Linux; app icon; xtask version/ico; plain launch reopens the last vault or asks for a folder; --version
Packaging is ported from the Craft family (effectcraft): DMG built and smoke-tested on
macOS aarch64, MSI/deb/rpm scripts adapted, thin release.yml and packaging-lint.yml callers.
rfd 0.17 added (native folder dialog; same version the other Craft apps use).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 12:48:09 -03:00

28 lines
1.9 KiB
Markdown

# Packaging
Release artifacts for the three desktop platforms. The version lives in one place, `[workspace.package]
version` in the root `Cargo.toml` (`cargo xtask version`, `cargo xtask version set 0.2.0`); every script reads
it from there. Artifacts land in `dist/release/`.
| Platform | Command | Output |
|---|---|---|
| macOS | `packaging/macos/package.sh [--arch universal\|aarch64\|x86_64]` | `NotesCraft.app` on a drag-to-Applications DMG, plus the CLI as a zip. Ad-hoc signed unless `MACOS_SIGN_IDENTITY` is set; notarized when `APPLE_ID`, `APPLE_PASSWORD`, `APPLE_TEAM_ID` are too. |
| Windows | `packaging/windows/package.ps1` | an MSI (WiX v5: `dotnet tool install -g wix`) with a Start Menu shortcut, plus the CLI as a zip. `sign.ps1` signs with Azure Trusted Signing in CI. |
| Linux | `packaging/linux/package.sh` | `.deb` and `.rpm` (nfpm), plus a tarball and an AppImage where the tools exist. |
`packaging/icons.sh` regenerates every icon file from `assets/app-icon/notescraft.svg` (needs `resvg`; the
outputs are committed, so building never needs it). CI is `.github/workflows/release.yml`, a thin caller of the
shared Craft release workflow (it needs the signing secrets listed there); `packaging-lint.yml` checks the scripts.
## Starting the app from a launcher
`notescraft [vault-folder]`: with no folder it reopens the last vault, else asks for one with the system folder
dialog (double-click in Finder, the Start Menu, a desktop launcher). `--version` prints the version with the
commit and date the packaging scripts bake in through `NOTESCRAFT_BUILD_SHA` and `NOTESCRAFT_BUILD_DATE`.
## Checked here
macOS (aarch64) is built and smoke-tested by `package.sh`. Windows is only checked to compile
(`cargo check --release --target x86_64-pc-windows-msvc`); the MSI scripts are the Craft family's, adapted, and
need a Windows runner (`packaging/windows/test-msi.ps1`).