Note
For comprehensive documentation, please visit the docs directory.
I help on lots of open source projects, im tired of doing the same thing over and over again.
so, I'm going to put them all together in one place.
Hopefully it will help you too.
General build action (multi-stack).
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.
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
- uses: snider/build@v3
with:
build-name: wailsApp
build-platform: linux/amd64- uses: snider/build@v3
with:
build-name: wailsApp
build-platform: linux/amd64
package: falseThis repository is multi-stack. The root action currently runs the Wails v2 pipeline by default. For full Wails-specific inputs and examples, see actions/build/wails2/README.md.
Common high-level inputs on the root action include:
build-name— required; base name for outputsbuild-platform— target platform (e.g.,linux/amd64,windows/amd64,darwin/universal)build— whether to build (defaulttrue)package— upload artifacts and (on tags) publish a release (defaulttrue)sign— enable platform signing when configured (defaultfalse)
Stack-specific inputs (Wails flags, signing certs, etc.) are documented in the Wails v2 wrapper: actions/wails2/README.md.
For Wails v2 end-to-end usage, examples, and advanced options, see:
- Wails v2 wrapper:
actions/build/wails2/README.md - Wails build sub-action:
actions/build/wails2/build/README.md
The root README focuses on multi-stack concepts. Stack-specific workflows are documented alongside each stack.
The detailed macOS code signing and notarization guide (including gon JSON examples and entitlements.plist) now lives with the Wails v2 stack docs:
- See
actions/build/wails2/README.md→ “macOS Code Signing (Wails v2)”
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.
Precedence used by the action (inside actions/setup):
- Environment variables > action inputs > defaults.
- If nothing is provided, Deno is skipped.
Supported variables:
DENO_ENABLE—true/1/yes/onexplicitly enables Deno even without a build command.DENO_BUILD— full command to run (e.g.,deno task build,deno run -A build.ts).DENO_VERSION— e.g.,v1.44.x.DENO_WORKDIR— working directory for the Deno command (default.).- Pass-throughs (used by Deno if present):
DENO_AUTH_TOKEN,DENO_DIR,HTTP_PROXY,HTTPS_PROXY,NO_PROXY, etc.
Example (job-level env):
jobs:
build:
runs-on: ubuntu-latest
env:
DENO_ENABLE: 'true'
DENO_VERSION: 'v1.44.x'
DENO_WORKDIR: 'frontend'
DENO_BUILD: 'deno task build'
steps:
- uses: actions/checkout@v4
- uses: snider/build@v3
with:
build-name: wailsApp
build-platform: linux/amd64Using $GITHUB_ENV in a prior step:
- name: Configure Deno via $GITHUB_ENV
run: |
echo "DENO_ENABLE=true" >> "$GITHUB_ENV"
echo "DENO_VERSION=v1.44.x" >> "$GITHUB_ENV"
echo "DENO_WORKDIR=frontend" >> "$GITHUB_ENV"
echo "DENO_BUILD=deno task build" >> "$GITHUB_ENV"
- uses: snider/build@v3
with:
build-name: wailsApp
build-platform: linux/amd64Secrets example (private modules):
env:
DENO_AUTH_TOKEN: ${{ secrets.DENO_AUTH_TOKEN }}This repo is modular. You can call the root action, the Wails v2 wrapper, or any sub-action directly.
- actions/discovery — detects OS/ARCH, Ubuntu version on Linux, and exposes repo/ref metadata.
- actions/options — computes
BUILD_OPTIONS(adds-tags webkit2_41on Ubuntu 24.04 when appropriate). - actions/setup — orchestrator that delegates to:
- actions/setup/go — Go, optional Garble, Wails CLI, and
gonon macOS. - actions/setup/npm — Node.js and npm install/ci in your app working directory.
- actions/setup/deno — optional; ENV-first Deno setup and command runner.
- actions/setup/conan — placeholder for future C++ builds.
- actions/setup/go — Go, optional Garble, Wails CLI, and
- actions/build/wails2/build — runs
wails buildand fixes executable permissions per-OS. - actions/sign — unified macOS and Windows signing; notarizes on tags.
- actions/package — uploads artifacts; on tags, publishes a GitHub Release.
- Available:
- wails2 —
uses: snider/build/actions/build/wails2@v3(or just call the root action)
- wails2 —
- Coming soon:
- wails3 — once upstream stabilizes
- cpp — via
setup/conanand dedicated build/sign/pack steps
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.
The root action can auto-detect your stack and auto-enable setup steps. This makes snider/build@v3 “just work” for common layouts, while still allowing full control.
- Inputs (root action):
AUTO_STACK(defaulttrue) — auto-select a stack based onactions/discoveryoutputs.AUTO_SETUP(defaulttrue) — allow sub-setup enabling based on env toggles.STACK(optional) — force a stack (e.g.,wails2). When set, it takes precedence over auto.
- Environment toggles (read when
AUTO_SETUP == true):ENABLE_GO,ENABLE_NPM,ENABLE_DENO,ENABLE_CONAN—true/1/yes/onto explicitly enable those setups; otherwise defaults are used.
- Precedence and routing:
- If
STACKis set, the root action routes to that stack wrapper directly. - Else if
AUTO_STACKis enabled, the root action usesPRIMARY_STACK_SUGGESTIONfrom discovery and routes accordingly (currentlywails2). - You can fully opt out by setting
AUTO_STACK: 'false'andAUTO_SETUP: 'false'and calling sub-actions directly in your workflow.
- If
- Debug logs:
- Look for
[DEBUG_LOG] Auto stack=...and[DEBUG_LOG] npm-install resolved=...in the logs to see decisions made.
- Look for
Starting in v3, the actions/package sub-action composes a descriptive artifact name using discovery metadata:
<build-name>_<OS>_<ARCH>_<TAG|SHORTSHA>
- On tag builds, the tag (e.g.,
v1.2.3) is used. - On branch/PR builds, the short commit SHA is used.
- Example:
wailsApp_Ubuntu-22.04_amd64_ab12cd3orwailsApp_macos_arm64_v1.2.3.
When you call the root action or the wails2 wrapper, discovery outputs are passed automatically to actions/package.
The repository includes self-tests to surface issues early and gate app builds behind fast sub-action checks:
- Sub-action tests (gating):
discovery,options,setup/*(go, npm, deno, conan),signdiagnostics, andpackagerun first. App build jobs depend on these vianeeds:and will not execute if any sub-test fails. - Packaging smoke (Ubuntu): runs the root action locally with
package: trueon branch/PR builds and verifies artifact upload. No release is created on non-tag refs. Look for[DEBUG_LOG] ARTIFACT_NAME=...in logs. - Matrix builds with packaging: root action and the
wails2wrapper run on Ubuntu/macOS/Windows withpackage: trueon branches/PRs to confirm cross-OS uploads. Signing remains disabled. - Signing diagnostics (dry-run):
- macOS: prints
gon --versionif available or guidance if not; always green. - Windows: searches common Windows SDK locations for
signtool.exeand logs the result; always green.
- macOS: prints
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.
- Mirror the pattern: create stack-specific sub-action tests (e.g.,
setup/wails3,setup/conan, stack-specific build options) that are fast and deterministic. - Add the new test jobs to the app build job
needs:so stack builds only run after sub-tests pass. - Prefer dummy artifacts with the
actions/packagesub-action for packaging checks; keep releases tag-gated. - Keep tests secrets-free; add tool presence diagnostics (similar to
gon/signtool) for platform-specific tools.