### Basic Setup with Default Configuration Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Installs mise with default settings and runs `mise install`. This example installs the latest mise, reads tool versions from the repository, installs the tools, adds the mise bin directory to the PATH, and exports environment variables. ```yaml name: Setup mise on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 - run: node --version - run: python --version ``` -------------------------------- ### Basic Mise Setup Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Installs the latest version of mise and runs 'mise install'. This is the simplest way to get started. ```yaml uses: jdx/mise-action@v4 ``` -------------------------------- ### Selective Tool Installation Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Use the `install_args` input to specify which tools should be installed. This example installs only Node.js and Python. ```yaml - uses: jdx/mise-action@v4 with: install_args: "node python" # Only install node and python ``` -------------------------------- ### Download and Setup Mise Binary Source: https://github.com/jdx/mise-action/blob/main/_autodocs/implementation-reference.md The `setupMise` function downloads, verifies, and installs the mise binary, adding it to the system's PATH. It handles different versioning schemes, archive formats, and fetches from GitHub releases if specified. ```typescript async function setupMise(version: string, fetchFromGitHub = false): Promise { // ... implementation details ... } ``` -------------------------------- ### Main Entry Point for GitHub Action Source: https://github.com/jdx/mise-action/blob/main/_autodocs/implementation-reference.md The `run` function orchestrates the entire setup and installation flow for the mise-action. It handles error management by converting exceptions to GitHub Actions failures. ```typescript async function run(): Promise { try { // ... execution steps ... } catch (error) { core.setFailed(error as Error); } } ``` -------------------------------- ### Mise Action with All Input Parameters Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Demonstrates the full range of input parameters available for the mise action, including setup, installation, configuration files, environment, caching, features, and authentication. ```yaml - uses: jdx/mise-action@v4 with: # Binary Setup version: "2026.3.10" # [optional] Mise version to install sha256: "abc123..." # [optional] SHA256 checksum to verify fetch_from_github: true # [optional] Fetch from GitHub (vs mise.jdx.dev) # Installation install: true # [optional] Run `mise install` install_args: "node python" # [optional] Args to `mise install` reshim: false # [optional] Run `mise reshim --all` # Configuration Files tool_versions: | node 24.0.0 python 3.14.0 mise_toml: | [tools] node = "24.0.0" # Environment working_directory: . # [optional] Dir to run mise in mise_dir: ~/.local/share/mise # [optional] Mise install directory env: true # [optional] Export mise env vars # Caching cache: true # [optional] Use GitHub Actions cache cache_save: true # [optional] Write to cache cache_key: "{{default}}" # [optional] Custom cache key cache_key_prefix: "mise-v1" # [optional] Cache key prefix # Features experimental: false # [optional] Enable experimental features log_level: info # [optional] Log level: trace/debug/info/warn/error add_shims_to_path: true # [optional] Add shims to PATH # Authentication github_token: ${{ github.token }} # [optional] GitHub API auth wings_enabled: false # [optional] Enable mise-wings cache ``` -------------------------------- ### Installation Process Flow Source: https://github.com/jdx/mise-action/blob/main/_autodocs/configuration.md Visualizes the sequence of operations performed by the mise-action during installation, from setting up tools to exporting environment variables. ```text run() ├─ setToolVersions() # Write .tool-versions if provided ├─ setMiseToml() # Write mise.toml if provided ├─ restoreMiseCache() # Restore from cache (if cache: true) ├─ setupWings() # Set MISE_WINGS_ENABLED (if wings_enabled: true) ├─ setupMise() # Download/verify mise binary ├─ setEnvVars() # Export MISE_* variables ├─ miseReshim() # Run mise reshim (if reshim: true) ├─ testMise() # Run mise --version ├─ miseInstall() # Run mise install (if install: true) │ └─ saveCache() # Save to cache (if install succeeded and cache_save: true) ├─ miseLs() # Run mise ls └─ exportMiseEnv() # Export mise env vars (if env: true) ``` -------------------------------- ### Example Stack Trace Source: https://github.com/jdx/mise-action/blob/main/_autodocs/errors-and-exceptions.md An example stack trace indicating a SHA256 mismatch during binary setup, showing the error message and the location within the action's distributed JavaScript file. ```text Error: SHA256 mismatch: expected abc..., got xyz... for /home/runner/.local/share/mise/bin/mise at setupMise (/home/runner/work/.../dist/index.js:...) at run (/home/runner/work/.../dist/index.js:...) ``` -------------------------------- ### Install Tools from .tool-versions Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Installs tools by reading versions from the `.tool-versions` file in the repository. No specific `install_args` are needed as the action detects the file. ```yaml - uses: jdx/mise-action@v4 # Reads .tool-versions from repo ``` -------------------------------- ### Install Tools from mise.toml Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Installs tools by reading versions from the `mise.toml` configuration file in the repository. The action automatically detects and uses this file. ```yaml - uses: jdx/mise-action@v4 # Reads mise.toml from repo ``` -------------------------------- ### Conditional Tool Installation Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Install tools conditionally based on the GitHub event or branch. This example installs extra tools only for builds on the main branch. ```yaml name: Conditional tools on: push: branches: [main] pull_request: branches: [main] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: # Install extra tools for main branch builds install_args: > node ${{ github.ref == 'refs/heads/main' && 'aws-cli terraform' || '' }} - run: npm test - run: | if [ "${{ github.ref }}" == "refs/heads/main" ]; then aws s3 sync ./dist s3://my-bucket fi ``` -------------------------------- ### Install Specific Tools Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Installs a specific set of tools (e.g., node, python, rust) by providing arguments to `mise install`. ```yaml - uses: jdx/mise-action@v4 with: install_args: "node python rust" ``` -------------------------------- ### Install All Tools Using .tool-versions or mise.toml Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Configures the mise action to install all tools defined in the repository's `.tool-versions` or `mise.toml` files. ```yaml - uses: jdx/mise-action@v4 # Uses .tool-versions or mise.toml from repo ``` -------------------------------- ### Install Node.js with Mise Action Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Installs a specific version of Node.js using the mise action and verifies the installation by checking the Node.js version. ```yaml - uses: jdx/mise-action@v4 with: install_args: "node@24" - run: node --version ``` -------------------------------- ### Example .tool-versions File Source: https://github.com/jdx/mise-action/blob/main/_autodocs/configuration.md Illustrates the format for specifying tool versions in a .tool-versions file. This format is used when the 'tool_versions' input is provided. ```plaintext node 24.0.0 python 3.14.0 rust 1.85.0 ``` -------------------------------- ### Manual Fallback Installation Source: https://github.com/jdx/mise-action/blob/main/_autodocs/errors-and-exceptions.md Implement a fallback to manual mise installation if the action fails, ensuring the environment is set up even on action errors. ```yaml - uses: jdx/mise-action@v4 continue-on-error: true - name: Manual mise setup (fallback) if: failure() run: | curl https://mise.run | sh echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH mise install ``` -------------------------------- ### Install Multiple Tools Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Installs multiple tools (Node.js, Python, Rust) simultaneously by providing a space-separated string of tool versions to `install_args`. ```yaml - uses: jdx/mise-action@v4 with: install_args: "node@24 python@3.14 rust@1.85" ``` -------------------------------- ### Example Expanded Cache Key Source: https://github.com/jdx/mise-action/blob/main/_autodocs/caching-system.md An example of a fully expanded cache key, demonstrating how the default template is populated with specific values. ```text mise-v1-linux-x64-ubuntu24-2026.3.10-abc123def456... ``` -------------------------------- ### Example mise.toml Configuration Source: https://github.com/jdx/mise-action/blob/main/_autodocs/configuration.md Demonstrates the TOML format for configuring tools via the 'mise_toml' input. This allows specifying tool versions within a mise.toml file. ```toml [tools] node = "24.0.0" python = "3.14.0" rust = "1.85.0" ``` -------------------------------- ### Install Specific Python Version Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Installs a specific Python version using the `install_args` input. Verifies the installation by running `python --version`. ```yaml - uses: jdx/mise-action@v4 with: install_args: "python@3.14" - run: python --version ``` -------------------------------- ### One-Liner Mise Installation Script Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md This script installs Mise manually using curl and adds its binary and shim directories to the system's PATH. The Mise GitHub Action automates and caches this installation process. ```yaml - run: | curl https://mise.run | sh echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH ``` -------------------------------- ### Install Dependencies with aube Source: https://github.com/jdx/mise-action/blob/main/CLAUDE.md Installs project dependencies using the aube package manager. ```bash aube install ``` -------------------------------- ### Platform Variable Examples Source: https://github.com/jdx/mise-action/blob/main/_autodocs/caching-system.md Illustrates the format and examples of the platform identifier used in cache keys. This ensures cache isolation across different operating systems, architectures, and runner images. ```text linux-x64-ubuntu24 linux-x64-ubuntu20 macos-arm64-macos15 macos-x64-macos14 windows-x64-windows-2022 linux-x64-self-hosted ``` -------------------------------- ### Basic Mise Action Workflow Source: https://github.com/jdx/mise-action/blob/main/README.md This snippet shows a basic GitHub Actions workflow using the mise-action to install and manage tools. It demonstrates setting the mise version, enabling installation and caching, and specifying tool versions via a .tool-versions file. ```yaml name: test on: pull_request: branches: - main push: branches: - main jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: jdx/mise-action@v4 with: version: 2026.3.10 # [default: latest] mise version to install install: true # [default: true] run `mise install` install_args: "bun" # [default: ""] additional arguments to `mise install` cache: true # [default: true] cache mise using GitHub's cache experimental: true # [default: false] enable experimental features log_level: debug # [default: info] log level # automatically write this .tool-versions file tool_versions: | shellcheck 0.11.0 # or, if you prefer .mise.toml format: mise_toml: | [tools] shellcheck = "0.11.0" working_directory: app # [default: .] directory to run mise in reshim: false # [default: false] run `mise reshim -f` github_token: ${{ secrets.GITHUB_TOKEN }} # [default: ${{ github.token }}] GitHub token for API authentication - run: shellcheck scripts/*.sh test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: jdx/mise-action@v4 # .tool-versions will be read from repo root - run: node ./my_app.js ``` -------------------------------- ### Basic mise-action Setup Source: https://github.com/jdx/mise-action/blob/main/_autodocs/INDEX.md This is the most basic way to set up the mise-action in a GitHub Actions workflow. It uses the latest version of the action and default configurations. ```yaml - uses: jdx/mise-action@v4 ``` -------------------------------- ### Selective Tool Installation Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Installs only specific tools, skipping others that might be defined in a `.tool-versions` file. This speeds up builds when only a subset of tools is required. ```yaml name: Install subset of tools on: [push] jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "node shellcheck" - run: node --version - run: shellcheck scripts/*.sh test-python: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "python" - run: python -m pytest ``` -------------------------------- ### File Hash Example with No Config Source: https://github.com/jdx/mise-action/blob/main/_autodocs/caching-system.md Shows the 'no-config' segment in the cache key when no configuration files are found. This allows caching to proceed even in the absence of explicit configuration. ```text -no-config ``` -------------------------------- ### Mise-Action Setup with Tool Configuration Source: https://github.com/jdx/mise-action/blob/main/_autodocs/configuration.md Provides custom tool configurations directly within the action using a multi-line YAML string. This allows specifying versions for multiple tools. ```yaml - uses: jdx/mise-action@v4 with: mise_toml: | [tools] node = "24.0.0" python = "3.14.0" ``` -------------------------------- ### Avoid Overriding .tool-versions Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Do not use the `install_args` input if you intend for the action to respect the `.tool-versions` file for tool installations. ```yaml - uses: jdx/mise-action@v4 # Don't use install_args if you want .tool-versions ``` -------------------------------- ### Configure Custom Tools with Version List Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Specify the mise version and a list of tool versions to install using the `tool_versions` input. ```yaml - uses: jdx/mise-action@v4 with: version: 2026.3.10 tool_versions: | node 24.0.0 python 3.14.0 rust 1.85.0 ``` -------------------------------- ### Alternative Mise Installation in GitHub Actions Source: https://github.com/jdx/mise-action/blob/main/README.md Provides an alternative method to install mise directly within a GitHub Actions workflow using `curl` and `sh`. It also demonstrates how to add mise to the system's PATH. ```yaml jobs: build: steps: - run: | curl https://mise.run | sh echo "$HOME/.local/share/mise/bin" >> $GITHUB_PATH echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH ``` -------------------------------- ### Building and Testing Mise Action Locally Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Commands for local development of the Mise GitHub Action. Includes installing dependencies, building, testing, and formatting. ```bash # Install dependencies npm install # Build and bundle npm run package # Test the action npm test # Lint and format npm run lint npm run format:write ``` -------------------------------- ### Install Specific Mise Version Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Installs a specific version of mise. Use this when your project requires a particular mise release. ```yaml uses: jdx/mise-action@v4 with: version: 2026.3.10 ``` -------------------------------- ### GitHub Actions Workflow Example Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md A complete GitHub Actions workflow demonstrating the use of the Mise Action. It checks out code, uses the action to set up tools, and runs a test command. ```yaml jobs: build: runs-on: [ubuntu-latest, macos-latest, windows-latest] permissions: id-token: write # For wings_enabled steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: version: "2026.3.10" github_token: ${{ github.token }} - run: npm test ``` -------------------------------- ### Explicitly Use Lock File Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Explicitly tells the action to use the lock file for installation by setting `install_args` to `--locked`. ```yaml install_args: "--locked" # Explicit ``` -------------------------------- ### Mise-Action Setup with Custom Cache Key Source: https://github.com/jdx/mise-action/blob/main/_autodocs/configuration.md Allows defining a custom cache key template for mise. This provides fine-grained control over cache invalidation and management. ```yaml - uses: jdx/mise-action@v4 with: cache_key: "mise-custom-{{file_hash}}" ``` -------------------------------- ### Complex Build Pipeline Setup Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Orchestrate a multi-stage build pipeline including linting, testing with matrix strategy, building, and conditional deployment. Features parallel jobs, matrix builds, and tool-specific configurations per job. ```yaml name: Complete pipeline on: push: branches: [main, develop] pull_request: branches: [main, develop] jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "node shellcheck" cache_key_prefix: "mise-lint" - run: npm run lint - run: shellcheck scripts/*.sh test: runs-on: ubuntu-latest needs: lint strategy: matrix: node: ['22', '24'] steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "node@${{ matrix.node }} python" cache_key: "mise-test-{{platform}}-node-${{ matrix.node }}-{{file_hash}}" - run: npm test - run: python -m pytest build: runs-on: ubuntu-latest needs: test steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "node rust deno" - run: npm run build - run: cargo build --release - run: deno compile --allow-all --output=dist/app app.ts deploy: runs-on: ubuntu-latest needs: build if: github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "terraform aws-cli" github_token: ${{ secrets.GITHUB_TOKEN }} - run: terraform apply -auto-approve ``` -------------------------------- ### Mise Action with Specific Version Source: https://github.com/jdx/mise-action/blob/main/_autodocs/INDEX.md Specify a particular version of mise to be installed. This is useful for ensuring consistent behavior across runs. ```yaml - uses: jdx/mise-action@v4 with: version: "2026.3.10" ``` -------------------------------- ### Set Custom Mise Directory Source: https://github.com/jdx/mise-action/blob/main/_autodocs/configuration.md Specifies a custom directory for mise installation and caching, overriding platform defaults. ```yaml - uses: jdx/mise-action@v4 with: mise_dir: "/path/to/custom/mise" ``` -------------------------------- ### Use Locked Builds with mise.lock Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Automatically use `mise.lock` for reproducible builds. The action detects the lock file and appends `--locked` to `mise install`. ```yaml name: Locked builds on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 # No need to specify --locked; automatically detected - run: npm install - run: npm test ``` -------------------------------- ### Enable Experimental Features and Debug Logging Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Enable experimental features and set the log level to debug for troubleshooting. This provides verbose logs for cache, downloads, and installation processes. ```yaml name: Debug build on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: experimental: true log_level: debug - run: mise ls - run: npm test ``` -------------------------------- ### Inline Tool Configuration Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Provides tool versions directly within the action configuration using the `tool_versions` parameter. This is useful for quick setups or when a `.tool-versions` file is not present. ```yaml - uses: jdx/mise-action@v4 with: tool_versions: | node 24.0.0 python 3.14.0 ``` -------------------------------- ### Specify Working Directory Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Set a custom working directory for the action using the `working_directory` input. This ensures tools are installed and configured within the specified subdirectory. ```yaml - uses: jdx/mise-action@v4 with: working_directory: app/ ``` -------------------------------- ### Mise Action for Matrix Testing Source: https://github.com/jdx/mise-action/blob/main/_autodocs/INDEX.md Configure the action for matrix testing by dynamically setting installation arguments and cache keys based on matrix configurations. This is useful for testing across different tool versions. ```yaml - uses: jdx/mise-action@v4 with: install_args: "node@${{ matrix.node }}" cache_key: "mise-node-${{ matrix.node }}-{{file_hash}}" ``` -------------------------------- ### Custom Cache Key with Handlebars Conditionals Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Example demonstrating Handlebars conditionals within the `cache_key` input to conditionally include the mise version. ```yaml cache_key: "mise-{{platform}}{{#if version}}-{{version}}{{/if}}-{{file_hash}}" ``` -------------------------------- ### GitHub Token for Rate Limit Avoidance Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Installs many GitHub-hosted tools while avoiding API rate limits by using a GitHub token. The `github_token` defaults to `${{ github.token }}`. ```yaml name: Install from GitHub on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} install_args: "gh cli@latest node@latest bun@latest" - run: gh --version - run: node --version - run: bun --version ``` -------------------------------- ### Custom Cache Key Strategy Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Define a custom cache key strategy for fine-grained cache control. Includes options for platform, version, file hash, and install arguments hash. ```yaml name: Advanced caching on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: # Cache key includes platform, version, and file hash cache_key: "mise-v2-{{platform}}-{{version}}-{{file_hash}}" version: "2026.3.10" - run: npm test cache-invalidation: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: # Force new cache (useful if cache gets corrupted) cache_key_prefix: "mise-clean" - run: npm test ``` -------------------------------- ### Example Cache Key with Default Suffix Source: https://github.com/jdx/mise-action/blob/main/_autodocs/caching-system.md Extends the default cache key with a custom suffix. Useful for adding specific identifiers to the cache key without recomputing variables. ```yaml cache_key: "{{default}}-custom-suffix" ``` -------------------------------- ### Handling GitHub API Rate Limits Source: https://github.com/jdx/mise-action/blob/main/README.md This snippet shows how to provide a GitHub token to the mise-action to avoid rate limiting when installing tools hosted on GitHub. The action defaults to using `${{ github.token }}`. ```yaml - uses: jdx/mise-action@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} # your other configuration ``` -------------------------------- ### Multiple Tool Versions per Matrix Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Tests against multiple Node and Python versions using a GitHub Actions matrix strategy. It installs specific tool versions and uses a cache key that includes matrix variables, ensuring each combination has its own cache. ```yaml name: Matrix tests on: [push, pull_request] jobs: test: strategy: matrix: node: ['22', '23', '24'] python: ['3.11', '3.12', '3.13', '3.14'] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "node@${{ matrix.node }} python@${{ matrix.python }}" cache_key: "mise-${{ matrix.node }}-${{ matrix.python }}-{{file_hash}}" - run: npm test - run: python -m pytest ``` -------------------------------- ### Using Template Variables in Cache Keys Source: https://github.com/jdx/mise-action/blob/main/README.md Shows how to use template variables within the `cache_key` input to dynamically generate cache keys. This enables cache invalidation based on factors like platform, mise version, and installed tool arguments. ```yaml - uses: jdx/mise-action@v4 with: cache_key: "mise-{{platform}}-{{version}}-{{file_hash}}" version: "2026.3.10" install_args: "node python" ``` -------------------------------- ### Cache Save Flow Source: https://github.com/jdx/mise-action/blob/main/_autodocs/caching-system.md Details the process of saving a cache after a successful installation. It validates the cache directory and then uses GitHub Actions' cache.saveCache function. ```text saveCache(cacheKey) ├─ Validate cache directory exists ├─ cache.saveCache([cachePath], cacheKey) ├─ Log cache save details └─ Return ``` -------------------------------- ### Run Full Build Pipeline with aube Source: https://github.com/jdx/mise-action/blob/main/CLAUDE.md Executes the complete build process, including formatting, linting, and packaging. ```bash aubr all ``` -------------------------------- ### Enable Experimental Features and Wings Cache Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Activate experimental features and enable the Wings cache for potentially faster caching. Requires `id-token: write` permission. ```yaml permissions: id-token: write jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: jdx/mise-action@v4 with: experimental: true wings_enabled: true log_level: debug ``` -------------------------------- ### Inline Tool Configuration (.tool-versions format) Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Dynamically specifies tools using an inline `.tool-versions` format within the action. This offers an alternative to `mise_toml` for defining tool versions. ```yaml - uses: jdx/mise-action@v4 with: tool_versions: | node 24.0.0 python 3.14.0 go 1.23.0 rust 1.85.0 ``` -------------------------------- ### Custom Cache Key Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Define a custom cache key using Handlebars templating. This example includes the platform, mise version, and a hash of configuration files. ```yaml - uses: jdx/mise-action@v4 with: cache_key: "mise-{{platform}}-{{version}}-{{file_hash}}" version: 2026.3.10 ``` -------------------------------- ### Mise-Wings Cache for Faster Downloads Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Enable the mise-wings proxy for faster tool downloads. Requires `permissions: id-token: write` in the workflow and a supported mise-wings subscription. This speeds up downloads via a cached proxy and handles authentication automatically. ```yaml name: Fast builds with wings on: [push] permissions: id-token: write jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: wings_enabled: true install_args: "node python bun" - run: npm test - run: python -m pytest ``` -------------------------------- ### Run Integration Test Script Source: https://github.com/jdx/mise-action/blob/main/CLAUDE.md Executes the integration test script for the project. ```bash ./scripts/test.sh ``` -------------------------------- ### Disable Lock File Usage Source: https://github.com/jdx/mise-action/blob/main/_autodocs/quick-reference.md Disables the automatic use of lock files during installation by setting `install_args` to `--no-locked`. This assumes the underlying tool supports this flag. ```yaml install_args: "--no-locked" # Disable auto-locking (if supported) ``` -------------------------------- ### Configure Custom Tools with TOML Source: https://github.com/jdx/mise-action/blob/main/_autodocs/action-reference.md Specify the mise version and tool versions using a `mise_toml` input, allowing for TOML-formatted configuration. ```yaml - uses: jdx/mise-action@v4 with: version: 2026.3.10 mise_toml: | [tools] node = "24.0.0" python = "3.14.0" rust = "1.85.0" ``` -------------------------------- ### Inline Tool Configuration (TOML) Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Dynamically specifies tools using an inline `mise.toml` configuration within the action. This is useful for monorepos or when a repository tool-versions file is not desired. ```yaml name: Tools from action config on: [push] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: mise_toml: | [tools] node = "24.0.0" python = "3.14.0" go = "1.23.0" rust = "1.85.0" - run: node --version - run: python --version - run: go version - run: rustc --version ``` -------------------------------- ### Multi-Platform Testing with Mise Source: https://github.com/jdx/mise-action/blob/main/_autodocs/usage-examples.md Test your project on multiple operating systems (Linux, macOS, Windows) and Node.js versions. Uses platform-aware cache keys to prevent collisions. ```yaml name: Cross-platform tests on: [push, pull_request] jobs: test: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] node: ['22', '24'] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: jdx/mise-action@v4 with: install_args: "node@${{ matrix.node }}" # Platform-aware cache key prevents collisions cache_key: "mise-{{platform}}-node-${{ matrix.node }}-{{file_hash}}" - run: node --version - run: npm test ``` -------------------------------- ### Bundle for Distribution with aube Source: https://github.com/jdx/mise-action/blob/main/CLAUDE.md Bundles the project using rollup for distribution. ```bash aubr package ``` -------------------------------- ### Mise Action with Custom Tools Configuration Source: https://github.com/jdx/mise-action/blob/main/_autodocs/INDEX.md Configure custom tools and their versions directly within the action using a `mise.toml` snippet. This allows for project-specific toolchain management. ```yaml - uses: jdx/mise-action@v4 with: mise_toml: | [tools] node = "24.0.0" ``` -------------------------------- ### Save Mise Cache Source: https://github.com/jdx/mise-action/blob/main/_autodocs/implementation-reference.md The `saveCache` function saves the mise directory to GitHub Actions cache after a successful installation. It requires a cache key obtained during the restore phase and logs cache save information. ```typescript async function saveCache(cacheKey: string): Promise { // ... implementation details ... } ``` -------------------------------- ### Default Cache Key Template Source: https://github.com/jdx/mise-action/blob/main/_autodocs/caching-system.md The Handlebars template used to generate cache keys. It includes variables for cache prefix, platform, mise version, environment, install arguments hash, and file hash. ```yaml {{cache_key_prefix}}-{{platform}}{{#if version}}-{{version}}{{/if}}{{#if mise_env}}-{{mise_env}}{{/if}}{{#if install_args_hash}}-{{install_args_hash}}{{/if}}-{{#if file_hash}}{{file_hash}}{{else}}no-config{{/if}} ``` -------------------------------- ### Format Code with Prettier using aube Source: https://github.com/jdx/mise-action/blob/main/CLAUDE.md Formats the project code using Prettier. ```bash aubr format:write ``` -------------------------------- ### Read-Only Cache for PR Builds Source: https://github.com/jdx/mise-action/blob/main/_autodocs/caching-system.md Configure the Mise Action to use the cache but disable cache saving for pull request builds. This prevents PRs from polluting the main cache while still benefiting from faster installs. ```yaml build: steps: - uses: jdx/mise-action@v4 with: cache: true cache_save: ${{ github.event_name != 'pull_request' }} ```