/Unity-CI-Templates

Unity CI/CD pipeline with multi-platform builds, releases, and deploys

Primary LanguageShaderLabMIT LicenseMIT

๐Ÿš€ Unity CI/CD Pipeline

Robust GitHub Actions workflows for Unity projects. Automates testing, multi-platform builds, and GitHub Releases with modular, reusable design.

CI License Unity Latest Release

๐ŸŒ WebGL Demo

See a live WebGL build deployed using this CI/CD pipeline:

โžก๏ธ Play the Demo

Deployed via GitHub Pages using the gh-pages deploy target.

๐Ÿš€ Getting Started

1๏ธโƒฃ Ensure your Unity project is in a GitHub repository
2๏ธโƒฃ Copy the required GitHub Actions workflows from the CICD_Workflows folder
3๏ธโƒฃ Add them to your repository at path: .github โ†’ workflows (create folders if missing)
4๏ธโƒฃ Configure the required secrets in your repository
5๏ธโƒฃ Read and optionally setup repository variables, they're important to understand the inputs for the workflow dispatch
6๏ธโƒฃ Try dispatching the ci-cd-dispatcher.yml workflow or push a Git tag using SemVer to see the pipeline in action!

โš ๏ธ Currently tested deploy targets: gh-pages (WebGL only), itch.io. Others are implemented but not yet fully verified. Contributions welcome!

๐Ÿ“– Documentation

For full setup instructions, deployment target guides, and advanced configuration tips, see the โžก๏ธ Wiki

๐Ÿ“Œ Features

Feature Description
๐Ÿงช Test Detection Auto-detects and runs EditMode & PlayMode tests.
๐Ÿ› ๏ธ Cross-Platform Builds Android, iOS, WebGL, macOS, Windows, and Linux supported.
๐Ÿ“ฆ Release Deployment Automatically creates GitHub Releases on tag push.
๐Ÿงน Modular Design Fully split into reusable workflow_call templates.
โšก Parallel Matrix Builds Parallel jobs across macOS and Ubuntu runners.
๐Ÿ” Secure License Activation Unity .ulf license securely injected during CI.
๐Ÿ—ƒ๏ธ LFS & Cache Optional Git LFS + caching of Unity Library and Packages/.
๐ŸŽ›๏ธ Manual Dispatch Manually trigger preview builds with JSON platform control.
๐Ÿš€ Deploy Upload builds to external platforms like itch.io, TestFlight, or custom servers
๐Ÿ“ฃ Notifications Discord/Slack webhook support
๐Ÿ” Static Analysis C# linters or Unity analyzers

โš  Current Limitations

While the pipeline is production-ready and modular, some deploy integrations are still marked as experimental:

  • ๐Ÿšง Deploy targets like Steam, TestFlight, App Center
    These are implemented but have not yet been fully validated in live release pipelines.

  • ๐Ÿ”— External platforms may require manual setup
    Some targets (like itch.io, Firebase, S3) require correctly configured secrets and accounts - be sure to test deploy flows in a safe sandbox environment before pushing to production.

  • ๐Ÿงช Unity version compatibility
    Currently optimized for Unity 2022.3+, tested with Unity 6 too, but older versions may work as well.

Contributions and testing feedback are welcome!
If you successfully validate additional targets or add new ones, please consider opening a PR to improve support for the community.


๐Ÿ™Œ Credits

Crafted with โค๏ธ by Avalin
Special thanks to RedGlow for contributions ๐Ÿ’ก
Powered by GitHub Actions + Unity + Tears. (PRs welcome!)