Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TrismegistusDevelopment/unity-package-manager-ci
Travis Ci scripts to push changes to specific branch for using with Unity Package Manager (UPM) system
https://github.com/TrismegistusDevelopment/unity-package-manager-ci
tool travis-ci unity unity-package-manager unitypackage upm
Last synced: 3 months ago
JSON representation
Travis Ci scripts to push changes to specific branch for using with Unity Package Manager (UPM) system
- Host: GitHub
- URL: https://github.com/TrismegistusDevelopment/unity-package-manager-ci
- Owner: TrismegistusDevelopment
- License: mit
- Created: 2019-04-15T19:17:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-07T08:11:52.000Z (almost 5 years ago)
- Last Synced: 2024-04-24T16:43:08.049Z (7 months ago)
- Topics: tool, travis-ci, unity, unity-package-manager, unitypackage, upm
- Language: Shell
- Homepage:
- Size: 21.5 KB
- Stars: 21
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# unity-package-manager-ci
[![](https://img.shields.io/badge/Unity-Package%20Manager-blue.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J%2FAAADzElEQVRIx5WVW2jWZRzHP%2B%2F736mdmG6Sp5sUt5ygYpJriad5oGXmhVkXWZCGFWSgtjnacp0QTGKGw3QXoUQw7CIstAhiCrpceGGC5lzpPM2F5DZ1B9veTxf%2BffduKtbvd%2FMc%2BH%2Be5%2F87fB%2F47xYhhRxmUUUDbbwfXzfBY0PGsYRVciKmmOMsq2ywzXzJF0h6yKEBaTzFbBblFM9iHvOZQAaPEKGI5iKaH3IDMgIzXOhmj3jNHvsdtHqp92G%2FQM1GL5loA%2FFRm1GJPgBAGpmk8fYU%2B%2BIfdHne7%2FwtPu92qky9L4C5aWaa5mhPqR222Ohu1zjaHA%2BrGlP7LTeQIAImBE2iG%2BZuW0YmtykgiyaO8yunf%2BEkTcl1tbwO%2FMAA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travis&style=popout)](https://travis-ci.org/)Travis Ci scripts to push changes to specific branch for using with Unity Package Manager (UPM) system
## How Unity Package Manager works with git
There's `Packages/manifest.json` in your Unity project folder. You can [manually add](https://docs.unity3d.com/Manual/upm-dependencies.html#Git) `git` dependencies in it like this
```json
"com.company.repo.name": "https://YourGitHost.com/UserName/RepoName.git#BranchName"
```
To update asset through UPM you must delete reference in `lock` section in manifest.Currently you must follow strict rules if you want to use your asset like this. Most importantly, aux files (manifest, asmdef) _must be in repo root and have `*.meta` files._
This repo will help you set up CI for separate UPM branch
## Examples
* [Hermesiss/unity-splines](https://github.com/Hermesiss/unity-splines)
* [vladfaust/unity-wakatime](https://github.com/vladfaust/unity-wakatime)## Configure Travis
1. Register at https://travis-ci.org/ for public or at https://travis-ci.com/ for private repos
2. Open repo settings, go to `Environment Variables`
3. Add variable with exact name `GITHUB_TOKEN` and value from [created token](https://github.com/settings/tokens) with selected scope `repo`## Add files to repo
1. Open your project in Unity
1. Create `package.json` near your main folder (but inside `Assets`!) with keywords and category of your choice:
```json
{
"name": "com.company.repo.name",
"displayName": "Display Name of Your Asset",
"version": "0.1.1",
"unity": "2018.3",
"description": "Short description of your asset",
"keywords": [
"unity", "editor"
],
"category": "Instrument"
}
```
1. Create [Assembly definition](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html) file `com.company.repo.name.asmdef` in the same folder:
```json
{
"name": "Display Name of Your Asset"
}
```
If you have Editor folders, repeat for each:
1. Create Assembly definition files with only `editor` platform included
1. Add references to other necessary asmdefs
1. Make sure that `*.meta` files appeared. You now must have 6 items in your dir: 1 folder, 1 .json, 1 .asmdef and 3 .meta
1. Copy `.travis.yml` file and `ci` folder to project's root
1. Edit `.travis.yml`, change env variables - target branches and folder to export. If you want to test this config, add custom test branch to `branches: only:` section
1. Commit and push changes## Different info
* If your commit doesn't require CI (like readme editing) you can add `[skip ci]` into your commit message and Travis won't build it
* Unity is not consistent while handling Editor folders in packages during build, so it's mandatory to wrap all editor scripts in `#IF UNITY_EDITOR ... #ENDIF` or make [new asmdef file](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html) in every Editor folder with only `Editor` checked in platforms