{"id":28788037,"url":"https://github.com/tolinsimpson/unity-github-build-automation","last_synced_at":"2026-04-15T05:31:47.119Z","repository":{"id":299450280,"uuid":"1003082265","full_name":"TolinSimpson/Unity-GitHub-Build-Automation","owner":"TolinSimpson","description":"Build automation pipeline for desktop platforms in Unity with versioned GitHub releases.","archived":false,"fork":false,"pushed_at":"2025-06-16T16:40:17.000Z","size":78,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-16T16:46:47.057Z","etag":null,"topics":["build-automation","build-tool","bundler","desktop","editor-window","github","inno-setup","linux","macos","pipeline","release","release-automation","signing-certificates","standalone","unity","unity-package","updater","windows","zip"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TolinSimpson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-16T15:39:25.000Z","updated_at":"2025-06-16T16:40:20.000Z","dependencies_parsed_at":"2025-06-16T16:46:51.205Z","dependency_job_id":"a50b99c4-b429-4a4e-8e39-95b828313807","html_url":"https://github.com/TolinSimpson/Unity-GitHub-Build-Automation","commit_stats":null,"previous_names":["tolinsimpson/unity-github-build-automation"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/TolinSimpson/Unity-GitHub-Build-Automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TolinSimpson%2FUnity-GitHub-Build-Automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TolinSimpson%2FUnity-GitHub-Build-Automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TolinSimpson%2FUnity-GitHub-Build-Automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TolinSimpson%2FUnity-GitHub-Build-Automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TolinSimpson","download_url":"https://codeload.github.com/TolinSimpson/Unity-GitHub-Build-Automation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TolinSimpson%2FUnity-GitHub-Build-Automation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260439480,"owners_count":23009294,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build-automation","build-tool","bundler","desktop","editor-window","github","inno-setup","linux","macos","pipeline","release","release-automation","signing-certificates","standalone","unity","unity-package","updater","windows","zip"],"created_at":"2025-06-17T21:00:57.864Z","updated_at":"2026-04-15T05:31:47.092Z","avatar_url":"https://github.com/TolinSimpson.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Build Pipeline\n\nA comprehensive Unity build pipeline that supports multi-platform desktop builds, code signing, packaging. Exports executables to GitHub releases.\n\n## Features\n\n- ✅ Multi-platform builds (Windows, macOS, Linux)\n- ✅ macOS code signing and notarization\n- ✅ GitHub Actions-powered DMG creation\n- ✅ Windows installer generation (Inno Setup)\n- ✅ Automated GitHub releases\n- ✅ Build profiles support\n- ✅ Version management\n\n## Platform-Specific Outputs\n\n### Windows\n- **Executable**: `.exe` file\n- **Package**: `.zip` archive\n- **Installer**: `.exe` installer (when Inno Setup is available)\n\n### macOS\n- **Executable**: `.app` bundle\n- **Package**: `.zip` archive (local) + `.dmg` disk image (via GitHub Actions)\n- **Features**: Professional DMG with drag-and-drop installation interface\n\n### Linux\n- **Executable**: Binary file\n- **Package**: `.zip` archive\n\n## Setup\n\n### Prerequisites\n\n1. **Unity 2022.3+** with target platform modules installed\n2. **GitHub repository** with appropriate secrets configured\n3. **Platform-specific tools** (see below)\n\n### GitHub Secrets Required\n\nAdd these secrets to your GitHub repository:\n\n```\nUNITY_LICENSE    # Your Unity license (Personal/Plus/Pro)\nUNITY_EMAIL      # Unity account email\nUNITY_PASSWORD   # Unity account password\n```\n\n### macOS Code Signing Secrets (Optional)\n\nFor professional macOS distribution with proper code signing:\n\n```\nP12_CERT         # Your Developer ID certificate as base64-encoded P12 file\nP12_PASSWORD     # Password for the P12 certificate (if required)\nAPPLE_ID_PASSWORD # App-specific password for notarization (optional)\n```\n\n**Note**: The build pipeline supports flexible secret naming - you can use `P12_CERT` or `P12_CERTIFICATE` as the secret name.\n\n### GitHub Workflows Setup\n\nDMG creation is now handled by GitHub Actions. The workflow files are automatically set up when you import the build pipeline.\n\n#### Automatic Setup (Recommended)\nWhen you open a Unity project with the GitHub Build Pipeline for the first time, the workflow files will be **automatically extracted** to `.github/workflows/` at your project root.\n\n#### Manual Setup\nIf you need to regenerate the workflow files, you can call the regeneration method directly:\n\n1. Open Unity\n2. In the Console, run: `GitHub_Build_Pipeline.WorkflowAutoSetup.RegenerateWorkflowsZip()`\n3. Commit and push the generated `.github/workflows/` files to your repository\n\n**Note**: No local tools are required - DMG creation happens entirely on GitHub's macOS runners.\n\n### How Auto-Setup Works\n\nThe build pipeline includes a smart auto-setup system:\n\n1. **Bundled Workflows**: The package includes a `workflows.zip` file containing the latest GitHub Actions workflows\n2. **Auto-Extraction**: When Unity loads, the `WorkflowAutoSetup` script automatically checks if `.github/workflows/` exists\n3. **Seamless Setup**: If the folder is missing, the workflows are extracted automatically\n4. **Always Up-to-Date**: When you generate new workflow files, the ZIP is automatically updated\n\nThis ensures that anyone importing your build pipeline gets the correct workflow files without manual setup.\n\n## Usage\n\n### Local Building\n\n1. Open the Build Pipeline window: `Build → Build Pipeline`\n2. Configure your settings:\n   - **Version**: Auto-increment or manual\n   - **Platforms**: Select Windows, macOS, and/or Linux\n   - **Pipeline Steps**: Enable signing, installers, GitHub upload as needed\n   - **DMG Creation**: Enable to trigger GitHub Actions DMG workflow\n3. Click \"Start Build Pipeline\"\n\n### Manual DMG Creation\n\nTo create a DMG from an existing GitHub release:\n\n1. Configure GitHub repository URL and token\n2. Click \"Create DMG\" in the Individual Steps section\n3. The DMG will be automatically attached to the latest release\n\n### GitHub Actions\n\nThe pipeline includes comprehensive GitHub Actions workflows:\n\n#### Unity Build Workflow\n1. **Builds** on native runners (Windows, macOS, Linux)\n2. **Creates ZIP packages** for all platforms\n3. **Uploads to GitHub Releases** automatically\n\n#### DMG Creation Workflow\n1. **Downloads** macOS ZIP from the latest GitHub release\n2. **Creates professional DMG** with drag-and-drop interface\n3. **Attaches DMG** directly to the GitHub release\n\n#### Triggering Builds\n\n- **Push to main/develop**: Builds all platforms\n- **Create Release**: Builds and publishes release assets\n- **Manual Trigger**: Go to Actions → Unity Build Pipeline → Run workflow\n\n### DMG Creation Details\n\nThe macOS DMG creation process:\n\n1. **Professional DMG Creation**: Uses `create-dmg` for polished DMG files with:\n   - Custom volume name and icon\n   - Drag-and-drop interface with Applications folder shortcut\n   - Proper window sizing and positioning\n   - Professional appearance for distribution\n\n2. **Code Signing Integration**: \n   - Supports both GitHub secrets and local certificate signing\n   - Automatic fallback to ad-hoc signing if certificate issues occur\n   - Timeout protection prevents hanging on security commands\n   - Flexible secret naming (`P12_CERT` or `P12_CERTIFICATE`)\n\n3. **Distribution Optimization**:\n   - Sets proper file permissions (`chmod 644`) for cross-user compatibility\n   - Removes quarantine attributes to reduce security warnings\n   - Creates readable files for all users\n   - Professional DMG formatting for end-user distribution\n\n4. **Fallback Methods**: \n   - Uses native `hdiutil` if `create-dmg` is unavailable\n   - Always creates ZIP file as backup option\n   - Graceful error handling with informative messages\n\n## Configuration\n\n### Build Profiles\n\nEnable \"Use Build Profiles\" to use platform-specific settings:\n\n```\nAssets/Settings/Build Profiles/\n├── Windows Profile.asset\n├── MacOS Profile.asset\n└── Linux Profile.asset\n```\n\n### macOS Signing\n\nFor distribution outside the Mac App Store:\n\n#### Local Signing (Unity Editor)\n1. **Certificate**: Export Developer ID Application certificate as .p12\n2. **Entitlements**: Use custom or default hardened runtime entitlements\n3. **Configuration**: Set certificate path and password in build pipeline window\n\n#### GitHub Actions Signing (Recommended)\n1. **GitHub Secrets**: Configure `P12_CERT` secret with base64-encoded certificate\n2. **Password Management**: Set `P12_PASSWORD` if your certificate requires a password\n3. **Automatic Fallback**: If signing fails, automatically falls back to ad-hoc signing\n4. **Timeout Protection**: All signing operations have timeout protection to prevent hanging\n\n#### Notarization (Optional)\n1. **Requirements**: Apple Developer account with notarization access\n2. **Secrets**: `APPLE_ID_PASSWORD` (app-specific password)\n3. **Configuration**: Set Apple ID and Team ID in build pipeline\n4. **Automatic**: Runs after successful Developer ID signing\n\n### Windows Installer\n\nRequires [Inno Setup](https://jrsoftware.org/isinfo.php):\n\n- Download and install Inno Setup\n- Configure publisher information\n- Set installation options\n\n## File Structure\n\n```\nGitHub_Build_Pipeline/\n├── Editor/\n│   ├── BuildPipelineWindow.cs     # Main build pipeline UI\n│   ├── GitHubAPI.cs              # GitHub API integration\n│   └── WorkflowAutoSetup.cs      # Auto-setup workflow files\n├── Runtime/\n│   ├── FileUtility.cs            # File operations (ZIP creation)\n│   └── UpdateChecker.cs          # Auto-update functionality\n├── Resources/\n│   └── workflows.zip             # Bundled GitHub Actions workflows\n└── README.md                     # This file\n```\n\n## Troubleshooting\n\n### DMG Creation Issues\n\n**⚠️ Important: If your DMG files fail to open on Mac, see the [macOS DMG Troubleshooting Guide](MACOS_DMG_TROUBLESHOOTING.md) for detailed solutions.**\n\nCommon issues and quick fixes:\n\n**Problem**: DMG workflow fails to trigger\n**Solutions**:\n1. Verify GitHub repository URL and token are configured\n2. Ensure workflow files exist in `.github/workflows/`\n3. Check repository permissions for the GitHub token\n\n**Problem**: DMG creation workflow fails\n**Solutions**:\n1. Check GitHub Actions logs for detailed error messages\n2. Verify the macOS ZIP file exists in the release\n3. Ensure the ZIP contains a valid .app bundle\n\n\n\n### GitHub Actions Issues\n\n**Problem**: Build fails with license error\n**Solution**:\n- Verify `UNITY_LICENSE`, `UNITY_EMAIL`, `UNITY_PASSWORD` secrets\n- Ensure license supports target platforms\n\n**Problem**: macOS DMG creation fails in GitHub Actions\n**Solution**:\n- Check the workflow log for create-dmg installation\n- Verify GitHub secrets are properly configured (P12_CERT, P12_PASSWORD)\n- The workflow will automatically fall back to ad-hoc signing if certificate issues occur\n- DMG creation will fall back to ZIP if all methods fail\n\n**Problem**: Code signing hangs or times out\n**Solution**:\n- The workflow now includes automatic timeout protection (30-120 seconds)\n- Check GitHub Actions logs for specific timeout errors\n- Verify certificate format and password are correct\n\n### General Build Issues\n\n**Problem**: Build fails on specific platform\n**Solutions**:\n1. Ensure platform module is installed\n2. Check build profiles configuration\n3. Verify PlayerSettings for target platform\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test on multiple platforms\n5. Submit a pull request\n\n## License\n\nMIT \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolinsimpson%2Funity-github-build-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolinsimpson%2Funity-github-build-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolinsimpson%2Funity-github-build-automation/lists"}