Last active
February 24, 2026 22:45
-
-
Save tikipatel/462986dc57224c4bbec2f9f7b61dd45e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Install brew | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| install_brew_package() { | |
| local package_name=$1 | |
| local command_name=${2:-$package_name} | |
| echo "Checking if ${package_name} is installed..." | |
| if [[ $(command -v "${command_name}") == "" ]]; then | |
| echo "${package_name} not found. Installing ${package_name} using Homebrew..." | |
| brew install "${package_name}" | |
| # Verify installation | |
| if [[ $(command -v "${command_name}") == "" ]]; then | |
| echo "Error: Failed to install ${package_name}. Please install manually." | |
| exit 1 | |
| else | |
| echo "${package_name} installed successfully!" | |
| fi | |
| else | |
| echo "${package_name} is already installed." | |
| fi | |
| } | |
| # Make sure brew is in PATH after installation | |
| echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >>~/.bash_profile | |
| eval "$(/opt/homebrew/bin/brew shellenv)" | |
| install_brew_package "xcodegen" | |
| install_brew_package "yq" | |
| install_brew_package "periphery" | |
| pip3 install pyyaml | |
| # So that any xcode-select or xcode-build commands run with sudo don't require password | |
| echo "%admin ALL=NOPASSWD: /usr/bin/xcode-select,/usr/bin/xcodebuild -runFirstLaunch" | sudo tee /etc/sudoers.d/xcode | |
| echo "Installing xcpretty via gem..." | |
| sudo gem install xcpretty | |
| brew install xcbeautify | |
| # Create a folder | |
| $ mkdir actions-runner && cd actions-runnerCopied!# Download the latest runner package | |
| $ curl -o actions-runner-osx-arm64-2.331.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.331.0/actions-runner-osx-arm64-2.331.0.tar.gz# Optional: Validate the hash | |
| $ echo "6f56ce368b09041f83c5ded4d0fb83b08d9a28e22300a2ce5cb1ed64e67ea47c actions-runner-osx-arm64-2.331.0.tar.gz" | shasum -a 256 -c# Extract the installer | |
| $ tar xzf ./actions-runner-osx-arm64-2.331.0.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment