Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nhedger/setup-mago/llms.txt
Use this file to discover all available pages before exploring further.
The nhedger/setup-mago action supports three runner operating systems — Linux, macOS, and Windows — across two CPU architectures: x64 and arm64. The correct binary is selected automatically at runtime based on the values of process.platform and process.arch reported by the Node.js 24 runtime that executes the action.
Supported Runners
| Runner label | Platform | Architectures supported |
|---|
ubuntu-latest | Linux | x64, arm64 |
macos-latest | macOS | x64, arm64 |
windows-latest | Windows | x64, arm64 |
Architecture Mapping
GitHub Actions reports runner architectures as x64 or arm64. The action translates these to the naming conventions used by the Mago release assets before constructing the download URL:
| GitHub Actions arch | Mago asset arch |
|---|
x64 | x86_64 |
arm64 | aarch64 |
Asset Naming Patterns
Each release of Mago on the carthage-software/mago GitHub Releases page publishes one binary archive per supported platform and architecture. The action locates the correct asset by matching the release asset name against a platform-specific pattern.
Linux
mago-{version}-x86_64-unknown-linux-musl.tar.gz
mago-{version}-aarch64-unknown-linux-musl.tar.gz
The Linux target triple uses the musl libc variant, producing fully static binaries that run on any Linux distribution without additional runtime dependencies.
macOS
mago-{version}-x86_64-apple-darwin.tar.gz
mago-{version}-aarch64-apple-darwin.tar.gz
Both Intel (x86_64) and Apple Silicon (aarch64) macOS runners are supported.
Windows
mago-{version}-x86_64-pc-windows-msvc.zip
mago-{version}-aarch64-pc-windows-msvc.zip
Windows assets are distributed as .zip archives rather than .tar.gz.
Archive Handling
The action uses the GitHub Actions toolkit to extract downloaded archives. The process differs by platform:
| Platform | Archive format | Extraction method | Binary name |
|---|
| Linux | .tar.gz | extractTar | mago |
| macOS | .tar.gz | extractTar | mago |
| Windows | .zip | extractZip | mago.exe |
After extraction, the binary is set to permission mode 755 and its parent directory is added to PATH using @actions/core addPath. This makes the mago (or mago.exe) command available to all subsequent steps in the job without any additional configuration.
To run Mago across all three supported operating systems in a single workflow, use a strategy matrix:
jobs:
lint:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: nhedger/setup-mago@v1
- run: mago lint
The fail-fast: false option is worth adding to the matrix when debugging platform-specific issues, so a failure on one OS does not cancel runs on the others:strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]