Reusable GitHub Actions workflows for preset.nz code repos. One check.yml sets up a repo's own toolchain and runs just check, so CI is the same everywhere and a tool pin changes in one place.
CI runs just check and nothing else. Whatever check needs belongs in the repo's justfile, not in the workflow call.
A package (facets): pnpm only, detected from package.json.
name: CI
on: { push: { branches: [main] }, pull_request: {} }
permissions: { contents: read }
jobs:
check:
uses: preset-nz/workflows/.github/workflows/check.yml@<tag-or-sha>An app (Shard): pnpm and Rust, plus Tauri's Linux libraries.
name: CI
on: { push: { branches: [main] }, pull_request: {} }
permissions: { contents: read }
jobs:
check:
uses: preset-nz/workflows/.github/workflows/check.yml@<tag-or-sha>
with: { tauri: true }A repo that adopts check.yml deletes its copied licences.yml: check.yml installs preset-compliance (pinned here, once) and just check calls just licences.
- Checks out the repo. With
packages: true, clonespreset-nz/packages(atpackages-ref) to../../packages, where an app's committed path and link dependencies point. - With
package.json: installs pnpm at the version inpackageManager, Node 24 with the pnpm store cached, thenpnpm install --frozen-lockfile. - With
rust-toolchain.toml, or aCargo.tomlwithin two directories of the root: installs Rust through rustup (the file's channel and components, else stable) with clippy and rustfmt, addsrust-targets, and caches withSwatinem/rust-cache. - Installs
just, andpreset-compliance(binary only). - Runs
just check.
It has permissions: contents: read, and a newer push to the same ref cancels the older run.
| Input | Type | Default | What it does |
|---|---|---|---|
runs-on |
string | ubuntu-latest |
Runner label. A calling job that uses a workflow can't set its own runner. |
rust-targets |
string | empty | Extra rustup targets, space-separated, e.g. wasm32-unknown-unknown (Fault). |
wasm-pack |
boolean | false |
Installs wasm-pack (Fault). |
tauri |
boolean | false |
Installs the Linux system libraries a Tauri 2 app needs to compile: webkit2gtk 4.1, GTK 3, ayatana appindicator, librsvg, OpenSSL, libxdo, ALSA headers. |
uv |
boolean | false |
Installs uv (Oblique's sidecar: ruff, pytest). |
packages |
boolean | false |
Clones preset-nz/packages to ../../packages, for an app that takes a package by path or link: (Shard's rhizome and preset-docs). If package.json links one, installs the monorepo's JavaScript dependencies too. |
packages-ref |
string | main |
The preset-nz/packages branch, tag or SHA to clone. |
- pnpm:
"packageManager": "pnpm@11.1.1"inpackage.json. - Rust:
rust-toolchain.tomlwithchannel = "stable"and the components the repo uses. The version floats, so CI can run ahead of a machine that hasn't runrustup update.
Callers pin a tag or a full commit SHA, never a branch. The pilot repos call a fixed tag. A moving v1 appears only once the pilot is green, because a bad v1 breaks every repo at once.
Third-party actions inside check.yml are pinned by commit SHA with the tag in a comment. preset-nz/compliance is pinned by tag instead: the action picks which binary to download from its own ref, and a SHA would fall through to the latest release.
just prep # print tool versions
just check # actionlint and zizmor over the workflows
Releases: just release-preview, then just release. knope reads the version from the latest vX.Y.Z tag, since the repo has no package manifest.
MIT licensed.