Mise downloads GitHub release assets, but it does not install DMG applications into
/Applications. Add this custom global task to ~/.config/mise/config.toml:
[tasks."macos:install-dmg-app"]
hide = true
run = '''
set -euo pipefail
install_path="${MISE_TOOL_INSTALL_PATH:?MISE_TOOL_INSTALL_PATH is required}"
dmg_pattern="${MACOS_DMG_PATTERN:-*.dmg}"
app_pattern="${MACOS_APP_PATTERN:-*.app}"
dmg="$(find "$install_path" -maxdepth 1 -name "$dmg_pattern" -type f -print -quit)"
app_root="$install_path"
if [ -n "$dmg" ]; then
mount="$(hdiutil attach "$dmg" -nobrowse -readonly |
awk '/\/Volumes\// {print substr($0, index($0, "/Volumes/")); exit}')"
cleanup() {
hdiutil detach "$mount" -quiet 2>/dev/null || true
}
trap cleanup EXIT
app_root="$mount"
fi
app="$(find "$app_root" -maxdepth 1 -name "$app_pattern" -type d -print -quit)"
[ -n "$app" ] || { echo "No .app found in $app_root"; exit 1; }
app_name="${MACOS_APP_NAME:-$(basename "$app")}"
case "$app_name" in
*.app) ;;
*) app_name="$app_name.app" ;;
esac
ditto "$app" "/Applications/$app_name"
'''
Then declare apps using mise’s GitHub backend:
[tools."github:user/repo"]
version = "latest"
asset_pattern = "App-darwin-arm64-{{ version }}.dmg"
postinstall = "mise run --skip-tools --raw macos:install-dmg-app"
For ZIP releases containing an
.app:
asset_pattern = "App-*.zip"
strip_components = 0
postinstall = "mise run --skip-tools --raw macos:install-dmg-app"
Install or upgrade:
mise install
mise upgrade