Skip to content

Commit aff0ff6

Browse files
committed
docs: an Astro 7 site on Pages, and a README shaped for the marketplace
The README was a single scrolling page carrying quickstart, every input, the Deno environment contract, artifact naming, signing, orchestrator internals and CI notes — readable as a reference, useless as a listing. A marketplace visitor decides in about ten seconds whether the action does what they need. So: header, one sentence, one example that is what most people will paste, then a table of contents that links out. Everything it used to carry is on the site rather than deleted. docs/ is now Astro 7 + Starlight, published to https://dappco.re/build/. The old flat markdown under docs/ still said and listed Wails v3 as "planned once upstream stabilizes"; it is replaced, not kept alongside, because two sets of docs rot at different rates. Styling is the Lethean design pack ported from lthn/desktop's foundations — the same oklch ramps, the same brand hue calibrated so --brand-400 lands on #40c1c5, the same never-pure-black rule. Starlight's own --sl-* variables point at those tokens rather than the palette being written twice. Light mode is not an inversion: teal at --brand-400 fails contrast on white, so it darkens to --brand-700. Fonts are @fontsource, bundled — no CDN, matching the desktop app's CSP-clean posture. Also fixes the wails3 fixture the new CI job caught: could not see the CLI, because the tool directive lives in go/go.mod and there was no go.work at the project root to bring it into scope. lthn/desktop has that file for exactly this reason; the fixture was not faithful without it. The failure reads as , which sounds like a missing install, so it is now documented on the Wails v3 page. Verified: npm run build produces 12 pages; — the exact command CI runs — now stages the frontend and leaves a 14MB binary. Co-Authored-By: Virgil <virgil@lethean.io>
1 parent 470dbbb commit aff0ff6

25 files changed

Lines changed: 7914 additions & 399 deletions

.github/workflows/docs.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Docs
2+
3+
# Publishes docs/ to GitHub Pages at https://dappco.re/build/. Path-filtered,
4+
# because a change to an action has no bearing on the site and a docs typo
5+
# should not queue behind a three-platform build matrix.
6+
on:
7+
push:
8+
branches: [main]
9+
paths:
10+
- 'docs/**'
11+
- '.github/workflows/docs.yml'
12+
pull_request:
13+
paths:
14+
- 'docs/**'
15+
- '.github/workflows/docs.yml'
16+
workflow_dispatch:
17+
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
concurrency:
24+
group: pages
25+
cancel-in-progress: false
26+
27+
jobs:
28+
build:
29+
name: Build the site
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: actions/setup-node@v4
34+
with:
35+
node-version: 22
36+
cache: npm
37+
cache-dependency-path: docs/package-lock.json
38+
- run: npm ci
39+
working-directory: docs
40+
- run: npm run build
41+
working-directory: docs
42+
- uses: actions/configure-pages@v5
43+
- uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: docs/dist
46+
47+
# A pull request proves the site still builds; only main publishes it.
48+
deploy:
49+
name: Publish to Pages
50+
if: github.event_name != 'pull_request'
51+
needs: build
52+
runs-on: ubuntu-latest
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
steps:
57+
- uses: actions/deploy-pages@v4
58+
id: deployment

README.md

Lines changed: 41 additions & 200 deletions
Original file line numberDiff line numberDiff line change
@@ -1,232 +1,73 @@
1-
# dAppCore/build@v4
1+
# dAppCore/build
22

33
[![CI](https://github.com/dAppCore/build/actions/workflows/ci.yml/badge.svg)](https://github.com/dAppCore/build/actions/workflows/ci.yml)
4-
[![License: MIT](https://img.shields.io/badge/License-EUPL-green.svg)](LICENSE)
4+
[![Licence: EUPL-1.2](https://img.shields.io/badge/licence-EUPL--1.2-blue.svg)](LICENSE)
55

6-
> [!NOTE]
7-
> For comprehensive documentation, please visit the [docs](docs/) directory.
8-
9-
10-
> I help on lots of open source projects, im tired of doing the same thing over and over again.\
11-
> so, I'm going to put them all together in one place.\
12-
> Hopefully it will help you too.
13-
14-
General build action (multi-stack).
15-
16-
By default, the root action will best guess the builds you might want to run and delegate to the appropriate sub-action. You can also explicitly select a stack and enable/disable setup steps.
17-
18-
you should write out an action that cherry-picks the parts you need; the auto-detected method works for me, based on the file structures in the tdd/* folders
19-
20-
# Default build
21-
```yaml
22-
- uses: dAppCore/build@v4
23-
with:
24-
build-name: wailsApp
25-
build-platform: linux/amd64
26-
```
27-
28-
## Build with No uploading
6+
One GitHub Action that reads your repository, works out what it is, and builds
7+
it — Wails v3, Wails v2, or a plain Go binary, on Linux, macOS and Windows.
298

309
```yaml
10+
- uses: actions/checkout@v4
3111
- uses: dAppCore/build@v4
3212
with:
33-
build-name: wailsApp
34-
build-platform: linux/amd64
35-
package: false
13+
build-name: myApp
3614
```
37-
## Inputs (high level)
38-
39-
This repository is multi-stack. The root action detects the stack and delegates; Wails v2 is the fallback when detection finds nothing it recognises. For stack-specific inputs and examples, see the wrapper README beside each stack.
4015
41-
Common high-level inputs on the root action include:
42-
- `build-name` — required; base name for outputs
43-
- `build-platform` — target platform (e.g., `linux/amd64`, `windows/amd64`, `darwin/universal`)
44-
- `build` — whether to build (default `true`)
45-
- `package` — upload artifacts and (on tags) publish a release (default `true`)
46-
- `sign` — enable platform signing when configured (default `false`)
16+
That detects the stack, installs the toolchains, builds, uploads the result as
17+
a workflow artifact, and publishes a GitHub release when the ref is a tag.
4718
48-
Stack-specific inputs (Wails flags, signing certs, etc.) are documented in the Wails v2 wrapper: `actions/wails2/README.md`.
19+
## Contents
4920
21+
| | |
22+
| :-- | :-- |
23+
| [Quickstart](https://dappco.re/build/quickstart/) | The matrix build, build-only, and apps not at the repository root |
24+
| [How detection works](https://dappco.re/build/detection/) | What it reads, what it concludes, how to overrule it |
25+
| [Wails v3](https://dappco.re/build/stacks/wails3/) | Runs your Taskfile target — so CI takes the path you do |
26+
| [Wails v2](https://dappco.re/build/stacks/wails2/) | Composes `wails build` flags from inputs |
27+
| [Go binaries](https://dappco.re/build/stacks/core/) | A Go project with no frontend |
28+
| [Inputs](https://dappco.re/build/reference/inputs/) | Every input, on the root action and each wrapper |
29+
| [Sub-actions](https://dappco.re/build/reference/sub-actions/) | Discovery, setup, build, sign and package, each callable alone |
30+
| [Packaging & releases](https://dappco.re/build/reference/packaging/) | Artifact naming, and what a tag changes |
31+
| [Code signing](https://dappco.re/build/reference/signing/) | macOS notarisation and Windows signtool |
5032

33+
### Three platforms
5134

52-
## Examples and stack-specific docs
35+
Nothing about the action changes per runner. The matrix does the work.
5336

54-
For Wails v2 end-to-end usage, examples, and advanced options, see:
55-
- Wails v2 wrapper: `actions/build/wails2/README.md`
56-
- Wails build sub-action: `actions/build/wails2/build/README.md`
57-
58-
The root README focuses on multi-stack concepts. Stack-specific workflows are documented alongside each stack.
59-
60-
## macOS code signing docs moved
61-
62-
The detailed macOS code signing and notarization guide (including `gon` JSON examples and `entitlements.plist`) now lives with the Wails v2 stack docs:
63-
- See `actions/build/wails2/README.md` → “macOS Code Signing (Wails v2)”
64-
65-
66-
## Configure Deno via environment variables (optional)
67-
68-
Deno is not required. If you want to run a Deno build/asset step before Wails, you can configure it entirely via env vars — no `deno-*` inputs are needed.
69-
70-
Precedence used by the action (inside `actions/setup`):
71-
- Environment variables > action inputs > defaults.
72-
- If nothing is provided, Deno is skipped.
73-
74-
Supported variables:
75-
- `DENO_ENABLE` — `true`/`1`/`yes`/`on` explicitly enables Deno even without a build command.
76-
- `DENO_BUILD` — full command to run (e.g., `deno task build`, `deno run -A build.ts`).
77-
- `DENO_VERSION` — e.g., `v1.44.x`.
78-
- `DENO_WORKDIR` — working directory for the Deno command (default `.`).
79-
- Pass-throughs (used by Deno if present): `DENO_AUTH_TOKEN`, `DENO_DIR`, `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`, etc.
80-
81-
Example (job-level env):
8237
```yaml
83-
jobs:
84-
build:
85-
runs-on: ubuntu-latest
86-
env:
87-
DENO_ENABLE: 'true'
88-
DENO_VERSION: 'v1.44.x'
89-
DENO_WORKDIR: 'frontend'
90-
DENO_BUILD: 'deno task build'
91-
steps:
92-
- uses: actions/checkout@v4
93-
- uses: dAppCore/build@v4
94-
with:
95-
build-name: wailsApp
96-
build-platform: linux/amd64
38+
strategy:
39+
matrix:
40+
os: [ubuntu-latest, macos-latest, windows-latest]
41+
runs-on: ${{ matrix.os }}
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: dAppCore/build@v4
45+
with:
46+
build-name: myApp
9747
```
9848

99-
Using `$GITHUB_ENV` in a prior step:
49+
### Build without publishing
50+
10051
```yaml
101-
- name: Configure Deno via $GITHUB_ENV
102-
run: |
103-
echo "DENO_ENABLE=true" >> "$GITHUB_ENV"
104-
echo "DENO_VERSION=v1.44.x" >> "$GITHUB_ENV"
105-
echo "DENO_WORKDIR=frontend" >> "$GITHUB_ENV"
106-
echo "DENO_BUILD=deno task build" >> "$GITHUB_ENV"
10752
- uses: dAppCore/build@v4
10853
with:
109-
build-name: wailsApp
110-
build-platform: linux/amd64
111-
```
112-
113-
Secrets example (private modules):
114-
```yaml
115-
env:
116-
DENO_AUTH_TOKEN: ${{ secrets.DENO_AUTH_TOKEN }}
54+
build-name: myApp
55+
package: false
11756
```
11857

119-
120-
## Sub-actions overview
121-
122-
This repo is modular. You can call the root action, the Wails v2 wrapper, or any sub-action directly.
123-
124-
- actions/discovery — detects OS/ARCH, Ubuntu version on Linux, and exposes repo/ref metadata.
125-
- actions/options — computes `BUILD_OPTIONS` (adds `-tags webkit2_41` on Ubuntu 24.04 when appropriate).
126-
- actions/setup — orchestrator that delegates to:
127-
- actions/setup/go — Go, optional Garble, Wails CLI, and `gon` on macOS.
128-
- actions/setup/npm — Node.js and npm install/ci in your app working directory.
129-
- actions/setup/deno — optional; ENV-first Deno setup and command runner.
130-
- actions/setup/conan — placeholder for future C++ builds.
131-
- actions/build/wails2/build — runs `wails build` and fixes executable permissions per-OS.
132-
- actions/build/wails3/build — runs the project's Taskfile target through `go tool wails3` and fixes executable permissions per-OS.
133-
- actions/sign — unified macOS and Windows signing; notarizes on tags.
134-
- actions/package — uploads artifacts; on tags, publishes a GitHub Release.
135-
136-
## Stacks
137-
138-
- Available:
139-
- **wails3** — `uses: dAppCore/build/actions/build/wails3@v4`
140-
- **wails2** — `uses: dAppCore/build/actions/build/wails2@v4`
141-
- **core** — plain Go binaries, no frontend
142-
- Coming soon:
143-
- cpp — via `setup/conan` and dedicated build/sign/pack steps
144-
145-
### wails2 or wails3?
146-
147-
Detection reads the Go module, because that is the only place the two differ
148-
unambiguously — both are Go plus a frontend. A module requiring `wails/v3`
149-
selects the v3 stack; anything else with Go and a frontend selects v2. The
150-
module is found at `go.mod` or `go/go.mod`, since keeping it one level down is
151-
a normal layout rather than an exception.
152-
153-
The stacks are not variations on each other. v2 takes build options as CLI
154-
flags this action composes. v3 projects own a Taskfile, and wails3 runs targets
155-
in it — so the v3 stack runs the project's own target rather than
156-
reconstructing the command, and CI takes the same path a developer does. That
157-
is why the v3 stack has no `build-platform` input: the Taskfile target and the
158-
runner decide together, and offering a platform would be offering a choice the
159-
stack cannot honour.
58+
### Pick the stack yourself
16059

16160
```yaml
162-
# wails3 — the Taskfile decides how; the runner decides which target
16361
- uses: dAppCore/build@v4
16462
with:
16563
build-name: myApp
166-
167-
# wails3, explicit target
168-
- uses: dAppCore/build/actions/build/wails3@v4
169-
with:
170-
build-name: myApp
171-
task: linux:package
64+
STACK: wails3
17265
```
17366

174-
Linux runners get `libgtk-4-dev` and `libwebkitgtk-6.0-dev`. Wails v3 compiles
175-
its GTK4 path unless the `gtk3` build tag is set, and installing the GTK3 pair
176-
instead fails as `Package 'gtk4', required by 'virtual:world', not found` —
177-
often at binding generation rather than at build, which reads as a frontend
178-
problem.
179-
180-
## Setup orchestrator notes
181-
182-
The `actions/setup` sub-action is a thin orchestrator that runs Go → npm → Deno (optional) → Conan (optional). It keeps Deno independent from Wails. Configure Deno via environment variables (ENV-first), or via inputs as a fallback. See the Deno section below and `actions/setup/deno/README.md` for details.
183-
184-
## Orchestrator controls (root action)
185-
186-
The root action can auto-detect your stack and auto-enable setup steps. This makes `dAppCore/build@v4` “just work” for common layouts, while still allowing full control.
187-
188-
- Inputs (root action):
189-
- `AUTO_STACK` (default `true`) — auto-select a stack based on `actions/discovery` outputs.
190-
- `AUTO_SETUP` (default `true`) — allow sub-setup enabling based on env toggles.
191-
- `STACK` (optional) — force a stack (e.g., `wails2`). When set, it takes precedence over auto.
192-
- Environment toggles (read when `AUTO_SETUP == true`):
193-
- `ENABLE_GO`, `ENABLE_NPM`, `ENABLE_DENO`, `ENABLE_CONAN` — `true`/`1`/`yes`/`on` to explicitly enable those setups; otherwise defaults are used.
194-
- Precedence and routing:
195-
- If `STACK` is set, the root action routes to that stack wrapper directly.
196-
- Else if `AUTO_STACK` is enabled, the root action uses `PRIMARY_STACK_SUGGESTION` from discovery and routes accordingly (currently `wails2`).
197-
- You can fully opt out by setting `AUTO_STACK: 'false'` and `AUTO_SETUP: 'false'` and calling sub-actions directly in your workflow.
198-
- Debug logs:
199-
- Look for `[DEBUG_LOG] Auto stack=...` and `[DEBUG_LOG] npm-install resolved=...` in the logs to see decisions made.
200-
201-
## Smarter artifact naming (package)
202-
203-
Starting in v3, the `actions/package` sub-action composes a descriptive artifact name using discovery metadata:
204-
205-
```text
206-
<build-name>_<OS>_<ARCH>_<TAG|SHORTSHA>
207-
```
208-
209-
- On tag builds, the tag (e.g., `v1.2.3`) is used.
210-
- On branch/PR builds, the short commit SHA is used.
211-
- Example: `wailsApp_Ubuntu-22.04_amd64_ab12cd3` or `wailsApp_macos_arm64_v1.2.3`.
212-
213-
When you call the root action or the `wails2` wrapper, discovery outputs are passed automatically to `actions/package`.
214-
215-
216-
## CI validations and gating
67+
Or call a stack directly: `dAppCore/build/actions/build/wails3@v4`.
21768

218-
The repository includes self-tests to surface issues early and gate app builds behind fast sub-action checks:
219-
- Sub-action tests (gating): `discovery`, `options`, `setup/*` (go, npm, deno, conan), `sign` diagnostics, and `package` run first. App build jobs depend on these via `needs:` and will not execute if any sub-test fails.
220-
- Packaging smoke (Ubuntu): runs the root action locally with `package: true` on branch/PR builds and verifies artifact upload. No release is created on non-tag refs. Look for `[DEBUG_LOG] ARTIFACT_NAME=...` in logs.
221-
- Matrix builds with packaging: root action and the `wails2` wrapper run on Ubuntu/macOS/Windows with `package: true` on branches/PRs to confirm cross-OS uploads. Signing remains disabled.
222-
- Signing diagnostics (dry-run):
223-
- macOS: prints `gon --version` if available or guidance if not; always green.
224-
- Windows: searches common Windows SDK locations for `signtool.exe` and logs the result; always green.
69+
---
22570

226-
These checks run on `push`/`pull_request` to branches and are safe on forks (no secrets required). On tag refs, real releases are only created when your workflow explicitly runs and `refs/tags/*` is detected.
71+
**Full documentation: [dappco.re/build](https://dappco.re/build/)**
22772

228-
### Extending CI for new stacks (cpp)
229-
- Mirror the pattern: create stack-specific sub-action tests (e.g., `setup/wails3`, `setup/conan`, stack-specific build options) that are fast and deterministic.
230-
- Add the new test jobs to the app build job `needs:` so stack builds only run after sub-tests pass.
231-
- Prefer dummy artifacts with the `actions/package` sub-action for packaging checks; keep releases tag-gated.
232-
- Keep tests secrets-free; add tool presence diagnostics (similar to `gon`/`signtool`) for platform-specific tools.
73+
`@v4` follows the latest v4 release. Pin `@v4.1.0` to choose your own upgrades.

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
dist/
2+
node_modules/
3+
.astro/

docs/README.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

docs/architecture.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)