Merge pull request #120 from storytold/docs/97-98-100
Docs: automation README, internal craftrules links, docs/releasing.md (#97, #98, #100)
This commit is contained in:
commit
64fc90498b
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
These rules bind every AI agent and every human contributor working in this repository. They come before any task, instruction or deadline. `CLAUDE.md` holds the day-to-day working instructions. If the two ever disagree, **this file wins.**
|
||||
|
||||
Some sections link to **craftrules**, the standards shared by the Crafting Apps. That repository is internal to the storytold team, so outside contributors can't open it. Every rule a contributor here must follow is stated in this file and `CLAUDE.md`; the craftrules links give team members the background.
|
||||
|
||||
---
|
||||
|
||||
## 1. Asset policy (absolute — no exceptions)
|
||||
|
|
@ -66,7 +68,7 @@ Anything else is forbidden, including assets whose licence you cannot prove from
|
|||
|
||||
### 1.4 Fonts live in craft-fonts
|
||||
|
||||
- Font assets shared by the Crafting Apps, including every Japanese font, live in [`storytold/craft-fonts`](https://github.com/storytold/craft-fonts), not here. **Never commit a font file to this repository**; adding a font means adding it to craft-fonts. (The Latin UI fonts already in `assets/fonts/` — Inter, JetBrains Mono, Dancing Script — stay.) The rules are in [craftrules `standards/fonts.md`](https://github.com/storytold/craftrules/blob/main/standards/fonts.md).
|
||||
- Font assets shared by the Crafting Apps, including every Japanese font, live in [`storytold/craft-fonts`](https://github.com/storytold/craft-fonts), not here. **Never commit a font file to this repository**; adding a font means adding it to craft-fonts. (The Latin UI fonts already in `assets/fonts/` — Inter, JetBrains Mono, Dancing Script — stay.) Team members: the shared rules are in [craftrules `standards/fonts.md`](https://github.com/storytold/craftrules/blob/main/standards/fonts.md) (internal).
|
||||
- craft-fonts is an **optional build input**, never a Cargo dependency: `CRAFT_FONTS_DIR=<checkout> cargo build` makes `crates/fonts/build.rs` embed its fonts as `printcraft_fonts::CRAFT_FONTS`. Without it PrintCraft builds, tests and runs, but has no Japanese face (Japanese UI text shows replacement boxes, and writing Japanese into a PDF returns a clear error). Release builds always set it (`.github/workflows/release.yml`), and `ATTRIBUTION.toml` lists it as a `[[build_input]]`.
|
||||
|
||||
### 1.5 Procedure for adding or changing an asset
|
||||
|
|
@ -88,7 +90,7 @@ If you find an asset that breaks these rules, stop and remove it from the reposi
|
|||
- Behaviour comes only from public specifications (ISO 32000-2, the Arlington model), public documentation and black-box observation.
|
||||
- Never copy GPL/AGPL code. Copyleft tools run only as external oracle processes.
|
||||
- Observe Acrobat only with synthetic fixtures. Never capture personal data, account information or recent files.
|
||||
- Shared real-file test oracles (Photoshop-authored PSDs, etc.) live in [`storytold/photocraft-corpus`](https://github.com/storytold/photocraft-corpus), explained in [craftrules `standards/test-corpora.md`](https://github.com/storytold/craftrules/blob/main/standards/test-corpora.md). Never commit large binary fixtures to this repo; fetch them pinned by commit and sha256-verified, as PhotoCraft does with `cargo xtask corpus`.
|
||||
- Shared real-file test oracles (Photoshop-authored PSDs, etc.) live in [`storytold/photocraft-corpus`](https://github.com/storytold/photocraft-corpus), explained in [craftrules `standards/test-corpora.md`](https://github.com/storytold/craftrules/blob/main/standards/test-corpora.md) (internal). Never commit large binary fixtures to this repo; fetch them pinned by commit and sha256-verified, as PhotoCraft does with `cargo xtask corpus`.
|
||||
|
||||
## 3. Agent control (automation and MCP)
|
||||
|
||||
|
|
@ -101,7 +103,7 @@ If you find an asset that breaks these rules, stop and remove it from the reposi
|
|||
|
||||
## 4. Never crash
|
||||
|
||||
PrintCraft opens files from strangers, and people trust it with their work. A malformed PDF, a bad tool argument, a corrupt settings file or a full disk must produce an error the user (or agent) can act on, never a crash and never lost work. **This outranks feature work:** don't ship a feature by adding a panic path, and fix a crash before building on top of it. The shared standard for every Crafting App is [`craftrules/standards/never-crash.md`](https://github.com/storytold/craftrules/blob/main/standards/never-crash.md).
|
||||
PrintCraft opens files from strangers, and people trust it with their work. A malformed PDF, a bad tool argument, a corrupt settings file or a full disk must produce an error the user (or agent) can act on, never a crash and never lost work. **This outranks feature work:** don't ship a feature by adding a panic path, and fix a crash before building on top of it. The rules below are the ones that bind this repository; the shared standard for every Crafting App, [`craftrules/standards/never-crash.md`](https://github.com/storytold/craftrules/blob/main/standards/never-crash.md), is internal to the storytold team.
|
||||
|
||||
- **Fail with `Result`.** Non-test code returns errors through the crate's error type and `?`. Where readers are lenient by design, fall back gracefully and record the repair (see Fidelity in `CLAUDE.md`).
|
||||
- **No panicking shortcuts.** No `unwrap()`, `expect()`, `panic!`, `unreachable!`, `todo!` or `unimplemented!` outside tests, unless the call is provably infallible (e.g. writing to a `Vec`), with a comment saying why. `assert!` only for internal invariants that input cannot reach.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ PrintCraft is a clean-room, open-source, Rust-native PDF application targeting A
|
|||
|
||||
## Non-negotiables
|
||||
- **Assets: read `AGENTS.md` §1 before adding or showing any icon, image, font or document.** No assets from Adobe products, ever. Only openly licensed or contributor-original assets are allowed, each with an entry in `ATTRIBUTION.toml`. `cargo xtask assets` enforces this. `AGENTS.md` overrides this file.
|
||||
- **Fonts live in [storytold/craft-fonts](https://github.com/storytold/craft-fonts).** Never commit font files here (`AGENTS.md` §1.4, [craftrules `standards/fonts.md`](https://github.com/storytold/craftrules/blob/main/standards/fonts.md)). It is the optional build input `CRAFT_FONTS_DIR`: `git clone https://github.com/storytold/craft-fonts ../craft-fonts && CRAFT_FONTS_DIR=../craft-fonts cargo test --workspace` embeds the Japanese fonts (UI fallback, Japanese text in edited PDFs) and runs their tests, which otherwise skip. Code using `printcraft_fonts::CRAFT_FONTS` must work when it is empty.
|
||||
- **Fonts live in [storytold/craft-fonts](https://github.com/storytold/craft-fonts).** Never commit font files here (`AGENTS.md` §1.4; team members: [craftrules `standards/fonts.md`](https://github.com/storytold/craftrules/blob/main/standards/fonts.md), internal). It is the optional build input `CRAFT_FONTS_DIR`: `git clone https://github.com/storytold/craft-fonts ../craft-fonts && CRAFT_FONTS_DIR=../craft-fonts cargo test --workspace` embeds the Japanese fonts (UI fallback, Japanese text in edited PDFs) and runs their tests, which otherwise skip. Code using `printcraft_fonts::CRAFT_FONTS` must work when it is empty.
|
||||
- **Clean-room.**
|
||||
- Never read, disassemble or copy anything inside the Acrobat bundle (names and listings only). **Never open `Contents/Resources/JavaScripts/`.**
|
||||
- Behaviour comes from public docs, specs (ISO 32000-2, the Arlington model) and black-box observation (`plan/acrobat/`).
|
||||
|
|
@ -29,7 +29,7 @@ PrintCraft is a clean-room, open-source, Rust-native PDF application targeting A
|
|||
- Cap allocations sized by input, and bound recursion with depth limits or seen-sets.
|
||||
- Handle lock poisoning.
|
||||
- No `unsafe` (`unsafe_code = "forbid"`).
|
||||
- Every crash fix gets a synthetic regression test. See `AGENTS.md` §4 and `craftrules/standards/never-crash.md`.
|
||||
- Every crash fix gets a synthetic regression test. See `AGENTS.md` §4 (and, for team members, the internal `craftrules/standards/never-crash.md`).
|
||||
- **Rust only** in the product and build (`xtask`). No handwritten JS/TS.
|
||||
- **Quality gates** before every commit: `cargo fmt --check`, `cargo clippy --workspace -- -D warnings`, `cargo test --workspace`, and the wasm check once `xtask ci` exists (M0).
|
||||
- **Commits:** one task id per commit (e.g. `M1.4: xref stream reader`). Commit only green states. End messages with the attribution line required by the environment.
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ Hours are for a single agent (low–high). "Done" is the estimated fraction of t
|
|||
| M10 | OCR, create, export, print | 200–350 | 33% | 130–235 | Done: create from blank/text/PNG/JPEG/TIFF (multi-page)/GIF/BMP; export PNG/JPEG/TIFF and text; Print (Acrobat's sizing, n-up, booklet, poster, comments & forms, preview, CUPS spooler, print-ready PDF). Done since: export all images; OCR (searchable image for pages, ranges and multiple files). Missing: OCR languages beyond Latin, editable-text OCR output, Office export/import, Windows/web printing |
|
||||
| M11 | Optimize, preflight, PDF/A/X/UA, print production | 200–350 | 18% | 165–290 | Done: new `optimize` crate: Reduce File Size and the PDF Optimizer (images measured where drawn, bicubic downsampling, JPEG/ZIP recompression only when smaller, discard objects and user data, Flate clean-up, resource merging, object streams). Missing: fonts and transparency panels, space audit, preflight, PDF/A/X/UA |
|
||||
| M12 | Accessibility, compare, measure, search, XFA | 200–380 | 20% | 160–305 | Done: new `a11y` crate with the Accessibility Checker (all 32 rules, report, Fix/Skip/Explain, options dialog and results panel, agent tools). Missing: autotag, Tags/Order/Content panels, Reading Order tool, alt-text workflow, compare, measure, search index, XFA |
|
||||
| M13 | Automation (MCP, Action Wizard, CLI) + AI providers | 60–120 | 45% | 33–66 | Done: MCP resources (document info, text, page images); headless tool table (91 tools incl. signing, optimizing, initial view, links, stamps, data exchange, comment review, forms authoring and scripts, redaction, sanitize, print, add content), opt-in MCP server over stdio, CLI `run`/`tools`, UI control channel with drag. Missing: Action Wizard, AI providers |
|
||||
| M13 | Automation (MCP, Action Wizard, CLI) + AI providers | 60–120 | 45% | 33–66 | Done: MCP resources (document info, text, page images); headless tool table (123 tools incl. signing, optimizing, initial view, links, stamps, data exchange, comment review, forms authoring and scripts, redaction, sanitize, print, add content), opt-in MCP server over stdio, CLI `run`/`tools`, UI control channel with drag. Missing: Action Wizard, AI providers |
|
||||
| M14 | 1.0 polish: performance, localization, installers | 120–250 | 0% | 120–250 | |
|
||||
| | **Total (original plan sizing)** | **2,085–3,840** | **≈ 35%** | **≈ 1,350–2,500 at the planned rate; ≈ 600–1,100 at the measured rate** | |
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Agent control for PrintCraft: a headless tool table over the engine, and an opt-in MCP server.
|
||||
|
||||
- **Layer:** L7 (architecture §13), but headless. It depends on `engine`, `render` and `organize`, never on a UI toolkit.
|
||||
- **Status:** 38 tools covering inspection, rendering, text, page edits, page labels, bookmarks, comments, form filling, password protection, metadata, undo/redo, save, combine, extract and split. Comment tools take geometry in the same top-left-origin points as everything else, and `comment_add` can mark text by searching for it (`find`). Planned next: form authoring and redaction tools as those features land, and MCP resources for page images. The running app's UI is driven separately, through the `ui.*` control channel in `printcraft-ui-egui`.
|
||||
- **Status:** over a hundred tools; `printcraft-cli tools` lists the current set with their schemas (the count isn't repeated here, so it can't go stale). They cover inspection, rendering, text, page edits and organizing, page labels, bookmarks, comments and their review, form filling and authoring (fields, properties, scripts, data exchange, detection), redaction and sanitizing, password protection and signatures, adding text, images, links and stamps, optimizing, OCR, printing, export, metadata, undo/redo, save, combine, extract and split. Comment tools take geometry in the same top-left-origin points as everything else, and `comment_add` can mark text by searching for it (`find`). The MCP server also serves the open documents as resources, page images included. The running app's UI is driven separately, through the `ui.*` control channel in `printcraft-ui-egui`.
|
||||
|
||||
## API
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ mcp::McpServer::new(a).serve(stdin, stdout)? // newline-delimited JS
|
|||
|
||||
**Opt-in only.** Nothing starts it automatically, and it opens no port. It runs while `printcraft-cli mcp [--root DIR]` runs, normally launched by an agent from its MCP configuration. It stops when stdin closes. The CLI's `mcp` Cargo feature (on by default) compiles it out entirely when disabled.
|
||||
|
||||
Implemented: `initialize` (protocol 2025-06-18, 2025-03-26, 2024-11-05), `ping`, `tools/list` (with `readOnlyHint`/`destructiveHint` annotations) and `tools/call` (JSON results also returned as `structuredContent`; images as `image/png`). Tool failures come back as `isError: true` results, so the agent can read and recover from them.
|
||||
Implemented: `initialize` (protocol 2025-06-18, 2025-03-26, 2024-11-05), `ping`, `tools/list` (with `readOnlyHint`/`destructiveHint` annotations), `tools/call` (JSON results also returned as `structuredContent`; images as `image/png`), and `resources/list`, `resources/templates/list` and `resources/read`. The resources expose the open documents read-only: `printcraft://doc/{doc}/info` (JSON), `…/text`, `…/page/{page}/text` and `…/page/{page}/image{?dpi}` (PNG, 1–600 dpi). Tool failures come back as `isError: true` results, so the agent can read and recover from them.
|
||||
|
||||
## Adding a tool
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@ set). Without that variable `CRAFT_FONTS` is empty and everything below copes:
|
|||
- `SHIPPORI_MINCHO`: Shippori Mincho's bytes, or `None`.
|
||||
|
||||
wasm32 builds embed only BIZ UDPGothic Regular, to keep the web build small. Font files are never
|
||||
committed here: see [craftrules `standards/fonts.md`](https://github.com/storytold/craftrules/blob/main/standards/fonts.md).
|
||||
committed here (`AGENTS.md` §1.4; team members: [craftrules `standards/fonts.md`](https://github.com/storytold/craftrules/blob/main/standards/fonts.md), internal).
|
||||
|
||||
The full font subsystem (parsing, shaping, subsetting and embedding) arrives with M2.2/M7.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,158 @@
|
|||
# Releasing PrintCraft
|
||||
|
||||
Every push to the `release` branch runs `.github/workflows/release.yml`. It builds installers for
|
||||
macOS, Windows, Linux, FreeBSD and the web, signs the ones it has certificates for, and creates or
|
||||
updates a **draft** GitHub Release named `PrintCraft v<version>`. Nobody sees a draft until a
|
||||
maintainer publishes it.
|
||||
|
||||
The pipeline was ported from PhotoCraft's. User-facing names say **PrintCraft**; files, binaries and
|
||||
ids stay lowercase (`printcraft-<version>-<platform>-<arch>.<ext>`, `ai.storyteller.printcraft`).
|
||||
|
||||
## Cutting a release
|
||||
|
||||
1. **Bump the version** on `main`. It lives only in `[workspace.package] version` in the root
|
||||
`Cargo.toml`:
|
||||
|
||||
```sh
|
||||
cargo xtask version # prints the current version
|
||||
cargo xtask version set 0.3.0 # or 0.3.0-rc.1; updates Cargo.toml and Cargo.lock
|
||||
```
|
||||
|
||||
Commit the change through the normal review flow (see the `Release: PrintCraft v0.2.1` PR).
|
||||
2. **Merge `main` into `release`** (or fast-forward it) and push. The workflow starts by itself.
|
||||
3. **Wait for the draft.** When every job has finished (notarization is the slow part), the
|
||||
Releases page has a draft `PrintCraft v0.3.0` targeting the pushed commit, with every artifact
|
||||
and `SHA256SUMS.txt`. The notes are generated from the merged PRs.
|
||||
4. **Check it.** Download an installer or two and read the job summaries. A `::warning::` there
|
||||
means a signing secret was missing and that artifact is unsigned.
|
||||
5. **Publish** the draft in the GitHub UI. Publishing creates the `v0.3.0` tag. Versions with a
|
||||
pre-release suffix (`-rc.1`) are marked as pre-releases.
|
||||
|
||||
Pushing to `release` again before you publish rebuilds the same draft and replaces its assets.
|
||||
Once the draft is published, the workflow refuses to touch that version again, so bump it first.
|
||||
|
||||
**Test runs:** *Actions ▸ Release ▸ Run workflow* runs the whole pipeline by hand. The optional
|
||||
`version` input (such as `0.3.0-rc.1`) overrides `Cargo.toml` for that run only; each job applies it
|
||||
with `cargo xtask version set` before building, so the binaries report it too. The jobs use the
|
||||
`release` environment, so pick the `release` branch in the dialog.
|
||||
|
||||
## What gets built
|
||||
|
||||
| Platform | Artifacts | Built on |
|
||||
|---|---|---|
|
||||
| macOS 11+ (universal: Apple silicon + Intel) | `printcraft-<v>-macos-universal.dmg`, `printcraft-cli-<v>-macos-universal.zip` | `macos-15` |
|
||||
| Windows 10+ x64 | `printcraft-<v>-windows-x64.msi`, `printcraft-<v>-windows-x64-portable.zip` | `windows-latest` |
|
||||
| Windows 10+ x86 (32-bit) | `printcraft-<v>-windows-x86.msi`, `printcraft-<v>-windows-x86-portable.zip` | `windows-latest` |
|
||||
| Windows 11 on ARM64 | `printcraft-<v>-windows-arm64.msi`, `printcraft-<v>-windows-arm64-portable.zip` | `windows-latest` (cross-compiled) |
|
||||
| Linux x86_64 | `printcraft-<v>-linux-x86_64.{AppImage,deb,rpm,tar.gz}` | `ubuntu-22.04` |
|
||||
| Linux aarch64 | `printcraft-<v>-linux-aarch64.{AppImage,deb,rpm,tar.gz}` | `ubuntu-22.04-arm` |
|
||||
| FreeBSD 14 x86_64 | `printcraft-<v>-freebsd-x86_64.tar.gz` | FreeBSD VM on `ubuntu-latest` |
|
||||
| Web | `printcraft-web-<v>.zip` (a static site; see [`packaging/web/README.md`](../packaging/web/README.md)) | `ubuntu-latest` |
|
||||
|
||||
The ARM64 Windows build is cross-compiled on the x64 runner, so signing and WiX work as for the
|
||||
other Windows builds; `.github/workflows/windows-arm64.yml` installs and runs it on ARM64 hardware.
|
||||
|
||||
Every binary reports its version (`printcraft --version`, `printcraft-cli --version`, *Help ▸ About*).
|
||||
The workflow sets `PRINTCRAFT_BUILD_SHA` and `PRINTCRAFT_BUILD_DATE` (`packaging/env.sh` fills them in
|
||||
for local builds): the commit is recorded in the macOS `Info.plist` (`PrintCraftBuildCommit`) and the
|
||||
date in the AppStream metadata. The binaries don't embed the commit yet.
|
||||
|
||||
**Fonts:** every job checks out [craft-fonts](https://github.com/storytold/craft-fonts) at the commit
|
||||
pinned in `release.yml` and builds with `CRAFT_FONTS_DIR` and `CRAFT_FONTS_REQUIRED=1`, so releases
|
||||
embed its Japanese fonts and fail rather than ship without them (`AGENTS.md` §1.4). Bump the pin
|
||||
deliberately.
|
||||
|
||||
### macOS
|
||||
|
||||
`packaging/macos/package.sh` builds both architectures, joins them with `lipo`, and assembles
|
||||
`PrintCraft.app` from `Info.plist.in` (bundle id `ai.storyteller.printcraft`, macOS 11+, PDF declared
|
||||
as a document type with rank Alternate, so PrintCraft is offered under Open With without taking over
|
||||
from Preview). Files opened from Finder arrive as Apple events, which
|
||||
`apps/printcraft/src/apple_events.rs` receives.
|
||||
|
||||
- **Signing** uses the hardened runtime and a secure timestamp, executable first, then the bundle.
|
||||
`packaging/macos/import-cert.sh` puts the certificate in a temporary keychain, deleted at the end
|
||||
of the job.
|
||||
- **Notarization:** the app is zipped and sent with `xcrun notarytool submit --wait`, the ticket is
|
||||
stapled, and the result is checked with `codesign --verify`, `stapler validate` and `spctl`. The
|
||||
app ships on a drag-to-Applications DMG, which is signed and notarized too.
|
||||
- **CLI:** `printcraft-cli` is signed and notarized as a zip. A bare executable can't hold a stapled
|
||||
ticket, so Gatekeeper looks it up online the first time a downloaded copy runs.
|
||||
|
||||
Without certificates (locally) the script signs ad-hoc and skips notarization:
|
||||
|
||||
```sh
|
||||
packaging/macos/package.sh --arch aarch64 # quicker, host-only; --arch universal needs both targets
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
`packaging/windows/package.ps1 -Arch x64|x86|arm64` builds with `-C target-feature=+crt-static`, so
|
||||
neither the MSI nor the portable zip needs the Visual C++ redistributable.
|
||||
|
||||
- Before packaging, it reads both executables' PE headers: the machine type must match `-Arch`, and
|
||||
`printcraft.exe` must be a GUI-subsystem program (no console window, #57) while `printcraft-cli.exe`
|
||||
stays a console program.
|
||||
- `printcraft.wxs` (WiX v5) installs per machine into Program Files with a Start Menu shortcut and an
|
||||
App Paths entry. The MSI version is the numeric `X.Y.Z` (MSI has no pre-release field), and
|
||||
same-version upgrades are allowed so release candidates replace each other. Icon ids end in `.ico`
|
||||
or `.exe` (Windows Installer requires it); packaging-lint checks this.
|
||||
- The portable zip holds both executables, the README, the licences, and the OFL licence of each
|
||||
embedded craft-fonts family.
|
||||
- **Signing:** `packaging/windows/sign.ps1` signs both executables and the MSI with `signtool`
|
||||
(SHA-256, RFC 3161 timestamp), from a `.pfx` (`WINDOWS_CERTIFICATE`) or Azure Trusted Signing
|
||||
(`AZURE_*`), whichever is configured. It is the one place to change when signing changes.
|
||||
|
||||
Locally: `dotnet tool install -g wix --version 5.0.2`, then `pwsh packaging/windows/package.ps1 -Arch x64`.
|
||||
|
||||
### Linux
|
||||
|
||||
`packaging/linux/package.sh` stages one FHS tree (both binaries, the desktop entry, hicolor icons,
|
||||
AppStream metainfo) and makes every format from it: an **AppImage** (any distribution, nothing to
|
||||
install), a **.deb** and an **.rpm** (built with [nfpm](https://nfpm.goreleaser.com) from
|
||||
`nfpm.yaml`; they integrate with the menu, MIME and icon caches), and a **.tar.gz**.
|
||||
|
||||
The binaries are built on Ubuntu 22.04, the oldest GitHub-hosted image, so they need only
|
||||
**glibc ≥ 2.35**: Ubuntu 22.04+, Debian 12+, Fedora 36+, RHEL 10. Windowing (X11, Wayland,
|
||||
xkbcommon) and the GPU (Vulkan, EGL) are loaded at runtime from the system; the .deb and .rpm declare
|
||||
them as dependencies (see `nfpm.yaml`).
|
||||
|
||||
Locally (on Linux, with nfpm): `packaging/linux/package.sh` or `--formats "deb tar"`.
|
||||
|
||||
### FreeBSD
|
||||
|
||||
GitHub has no FreeBSD runners, so the `freebsd` job runs `packaging/freebsd/package.sh` in a FreeBSD
|
||||
VM with the packages from `.github/workflows/freebsd.yml`. The tarball is a `/usr/local`-style tree
|
||||
with the same desktop entry, metainfo and icons as Linux. FreeBSD has no code signing for loose
|
||||
binaries; check the tarball against `SHA256SUMS.txt`.
|
||||
|
||||
### Web
|
||||
|
||||
`packaging/web/package.sh` runs `trunk build --release` in `apps/printcraft-web` and zips the site
|
||||
with sample `_headers` and `.htaccess` files. Hosting (MIME types, compression, caching, iframes) is
|
||||
covered in [`packaging/web/README.md`](../packaging/web/README.md).
|
||||
|
||||
## Secrets
|
||||
|
||||
The signing secrets live in the repository's **`release` environment** (*Settings ▸ Environments ▸
|
||||
release*), restricted to the `release` branch; every job in `release.yml` declares
|
||||
`environment: release`. Each secret is optional: if one is missing, that platform's artifacts are
|
||||
unsigned and the run shows a warning.
|
||||
|
||||
| Secret | Used for |
|
||||
|---|---|
|
||||
| `APPLE_CERTIFICATE`, `APPLE_CERTIFICATE_PASSWORD` | base64 Developer ID Application `.p12` and its password |
|
||||
| `KEYCHAIN_PASSWORD` | the temporary CI keychain (random if unset) |
|
||||
| `APPLE_ID`, `APPLE_PASSWORD`, `APPLE_TEAM_ID` | `notarytool` (an app-specific password) |
|
||||
| `WINDOWS_CERTIFICATE`, `WINDOWS_CERTIFICATE_PASSWORD` | base64 `.pfx` code-signing certificate and its password |
|
||||
| `AZURE_TENANT_ID`, `AZURE_CLIENT_ID`, `AZURE_CLIENT_SECRET` | service principal for Azure Trusted Signing (instead of a `.pfx`) |
|
||||
| `AZURE_SIGNING_ENDPOINT`, `AZURE_SIGNING_ACCOUNT`, `AZURE_CERT_PROFILE` | Trusted Signing endpoint, account and certificate profile |
|
||||
|
||||
`GITHUB_TOKEN` creates the release; only the final job gets `contents: write`.
|
||||
|
||||
## Checks
|
||||
|
||||
`.github/workflows/packaging-lint.yml` runs on changes to `packaging/` and the workflows: actionlint, shellcheck,
|
||||
a PowerShell parse, xmllint (WiX, plist, MIME), `desktop-file-validate`, `appstreamcli validate`, and
|
||||
the MSI icon-id check. The FreeBSD and Windows ARM64 workflows also exercise their packaging before a
|
||||
release does.
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
# ROOT workspace root
|
||||
# VERSION [workspace.package] version from Cargo.toml (override: PRINTCRAFT_VERSION)
|
||||
# DIST output directory for release artifacts (default: $ROOT/dist/release)
|
||||
# PRINTCRAFT_BUILD_SHA git commit baked into the binaries (see crates/engine/src/build_info.rs)
|
||||
# PRINTCRAFT_BUILD_SHA git commit, recorded in the macOS Info.plist (PrintCraftBuildCommit)
|
||||
# PRINTCRAFT_BUILD_DATE UTC build date, YYYY-MM-DD
|
||||
# CARGO_TARGET_DIR cargo's target dir (default: $ROOT/target)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue