Table of Contents
Bot works with Unity Builder Helper (UBH). Build APK for Google/Huawei and debug IPA for iOS. Upload all files on your server and make HTML page and manifest for install APK or IPA from server.
- Add project from Git repository
- Remove project
- List all projects
- Checkout project branch
- Update repository before build
- Build Unity project
- Build Xcode project
- Compile, archive and export to IPA with configurated manifest
- Generate HTML with install links
- Upload all objects to remote server via sshpass
- Get build logs for project
- Clear project's logs and builds
Bot uses build script from Unity Builder Helper generates support files for all bot steps, but you can use your own with modifications.
- Node.js
- sshpass
- Mac OS for building Xcode projects
- The steady hands
- Create new bot via BotFather
- Get bot token
- Add Unity Builder Helper to unity project
- Clone the repo
git clone https://github.com/mopsicus/unity-builder-bot.git
- Install NPM packages
npm install
- Edit
.envfile
BOT_TOKEN Telegram bot token
WHITE_LIST List of users separated by comma can send commands to bot. You can get your ID by @userinfobot
PROJECTS_DIR Directory for projects
OUTPUT_DIR Directory for builds
LOGS_DIR Directory for logs
UNITY Path to installed Unity, i.e. /Applications/Unity/Hub/Editor/2020.3.35f1/Unity.app/Contents/MacOS/Unity
BUILD_METHOD Method in Unity Builder Helper. It will build project and support files for bot.
TIMEOUT Timeout for Git and other shell operations
REMOTE_PATH Url for downloading builds, i.e. https://mopsicus.ru/builds
IOS_TEAM Your iOS Team ID for signing Xcode project
SSH_LOGIN SSH login
SSH_PASS SSH password
SSH_HOST Host for uploading files
SSH_PATH Path on host for storing files, i.e. ~/domains/mopsicus.ru/builds/
When you run Remote build from Unity, bot show message with command and button to run it. Bot will get updates from repo, build and upload files to your server, after that notify you with link to download.
- Run bot (i.e.
pm2ornode index.js) - See all commands via
/helpcommand - Add project to bot
- Open UBH in Unity Editor via hotkey
cmd+gor menu - Paste your Telegram user ID
- Run remote build
/add <repository url> <branch> Add project to bot and checkout branch
/remove <project name> Remove project
/checkout <project name> <branch> Checkout git branch
/build <project name> <branch> <platform> <defines> Build project and upload to host
/log <project name> <platform> <type> Get log files
/clear <project name> Clear builds and logs
/list Request projects list
/help Show commands list
- Add WebGL build
- Add iOS production build
- Add upload to AppStore
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE file for more information.
Mopsicus: [email protected]
Website: https://mopsicus.ru
Telegram: https://t.me/mopsicus
Project Link: https://github.com/mopsicus/unity-builder-bot
- Leopotam for the tip on sshpass