jassielof/Set up Zig
Install a verified Zig toolchain and restore Zig's build caches.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 22, 2026
- License
- MPL 2.0
Pinned Snippet
uses: jassielof/setup-zig@37e835ae70eccb73d65dcb8c92e3cb6568a43845 # v1.2.0tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| version | Zig release, full development version, latest, master, or Mach nominated version. When omitted, reads build.zig.zon's minimum_zig_version and then falls back to the latest stable release. | no | — |
| version-file | ZON manifest used for automatic version detection. | — | build.zig.zon |
| mirror | HTTPS Zig community mirror override, for example https://pkg.hexops.org/zig. The override is used exclusively. | no | — |
| cache | Restore and save the toolchain, Zig global cache, and project build cache. | — | true |
| cache-toolchain | Cache the extracted Zig toolchain when cache is enabled. | — | true |
| cache-key | Extra build-cache key segment. Use this for build options that affect cache compatibility, such as a target or optimization mode. | no | — |
| cache-dependency-path | Newline-separated glob patterns hashed into the build-cache key. | — | build.zig build.zig.zon |
| cache-path | Additional newline-separated build-cache paths or glob patterns. Zig's global cache and $ZIG_LOCAL_CACHE_DIR are always included. Add zig-pkg to preserve Zig 0.16's expanded project-local dependency tree. | no | — |
| cache-size-limit | Maximum build-cache upload size in MiB. Zero disables the limit. | — | 2048 |
Outputs
| name | description |
|---|---|
| version | Exact installed Zig version. |
| path | Directory containing the Zig executable. |
| cache-hit | Whether any compatible Zig build cache was restored. |
| toolchain-cache-hit | Whether the extracted Zig toolchain was already cached. |