Automation setup · Connect your team repository
Use clear labels to send jobs to this Mac
The node is a dedicated physical machine, but parallel builds still depend on memory, disk space and job isolation. Verify the full workflow with one build first, then increase concurrency.
GitHub Actions self-hosted runner
Add a self-hosted runner in your repository or organization’s Actions settings, then select macOS and ARM64. Follow the download, verification and registration commands provided there. Don’t use old installers from untrusted sources.
Register the runner under a dedicated system user and add labels such as vmfly,ios-build . Set the workflow’s runs-on to the matching labels so jobs don’t keep running in a shared environment.
runs-on: [self-hosted, macOS, ARM64, vmfly, ios-build]
GitLab Runner
Use a Runner version compatible with your GitLab environment, and get an authentication token by following the project or group runner setup flow. On macOS, use the shell executor and label the node macos-arm64 and your use-case labels.
Specify the same tags in pipeline jobs. Make sure the Runner working directory belongs to the user running it. That same user should be able to access certificates, dependency caches and build artifacts, so a successful interactive run doesn’t mask a failing automated job.
ios_archive:
tags:
- macos-arm64
- ios-build
script:
- bundle exec fastlane gym
Include restart recovery in your checks
From the GitHub runner registration directory, run its service script: ./svc.sh install and ./svc.sh start. For GitLab Runner, use the commands for your installation method: gitlab-runner install and gitlab-runner start. Don’t set up two auto-start mechanisms for the same runner.
On macOS, a service running as a user LaunchAgent typically depends on that user’s login session. Check the service’s generated configuration and runtime identity; a machine starting up doesn’t mean the build user is logged in. When no release job is running, test that the runner comes back online after a restart and can access its paths and Keychain and export artifacts.
Keep signing assets within controlled access
Provide build certificates and provisioning profiles through a security method approved by your team. A certificate must include its corresponding private key to sign builds. Store unlock passwords and automation tokens in protected CI variables, and restrict which branches and jobs can use them.
If your team uses fastlane match, follow your existing storage and access policies. When CI reads existing signing assets, prefer read-only mode. Before troubleshooting the archive command, check that the bundle identifier, team, export method and provisioning profile validity period all match.
Unattended jobs must be able to access the designated Keychain. Don’t put long-lived plaintext passwords in scripts or print all environment variables in logs. Remove private keys, tokens, passwords and signing assets before sharing logs.