Compare commits

..

206 Commits

Author SHA1 Message Date
Estellise Yukihime
c317d144c3 fix strategy 'Tag' versioning (#287)
* fix - remove \n in getTag method

* build ts

* recommit
2021-09-06 18:31:24 +02:00
Webber Takken
3ebdb0e678 Run license activation in an empty directory (#285) 2021-08-31 01:18:34 +02:00
dependabot[bot]
7d9f968d70 Bump path-parse from 1.0.6 to 1.0.7 (#282)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-11 23:50:32 +02:00
Webber Takken
70081d231f Indicate how to support us (#277) 2021-07-12 19:28:11 +02:00
dependabot[bot]
36364461d5 Bump normalize-url from 4.5.0 to 4.5.1 (#275)
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-01 14:15:01 +02:00
David Finol
b66dffbf92 Projectpath error message (#274)
* Improve error message

* Improve error message
2021-07-01 06:38:44 -05:00
dependabot[bot]
2fc01a1db4 Bump ws from 6.2.1 to 6.2.2 (#269)
Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/commits)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Webber Takken <webber@takken.io>
2021-06-06 00:01:42 +02:00
Webber Takken
8c1a159dd0 add default tag for feature request (#272) 2021-06-05 23:59:56 +02:00
ivan-hernandez-scopely
497f2f7b5f Using SSH_AUTH_SOCK (ssh agent forwarding) to pull upm private repos (#256)
* using SSH_AUTH_SOCK (ssh agent forwarding) to pull upm private repos

* sshAgent as input parameter

* yarn run prettier --write "src/**/*.{js,ts}"

* yarn run lint --fix && yarn build

* fixed compilation after rebase

* removed RUN apt-get update && apt-get install -y openssh-client. This change needs to be done upstream. See game-ci/docker#117
2021-05-28 23:51:10 +02:00
dependabot[bot]
71ca7bdbfc Bump browserslist from 4.16.4 to 4.16.6 (#266)
Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.16.4 to 4.16.6.
- [Release notes](https://github.com/browserslist/browserslist/releases)
- [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/browserslist/browserslist/compare/4.16.4...4.16.6)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-26 12:19:42 +02:00
Frostebite
c96b8cf443 Remote builder refactoring (#264)
Remote builder refactoring
2021-05-23 05:08:40 +01:00
Webber Takken
9fff362775 Remove -nographics flag, ensure single -batchmode flag (#261)
* Remove -nographics flag, ensure -batchmode

* Remove explicit batch mode

* Add libnotify4 and bin for notify-send

* non-interactive frontend

* Move docker changes to base image (docker repo)
2021-05-22 21:07:54 +02:00
Zhou Xinwei
f0e18ea3a5 Fixed addressable build failing on Addressable 1.17.17+ (#262) 2021-05-20 17:51:54 +02:00
Webber Takken
947c8b8e20 Fix typo in issue template (#260) 2021-05-13 14:03:00 +02:00
Webber Takken
a5de621fe2 Ensure proper read permissions and cleanup build.sh (#259)
* Add linux read permissions and cleanup build.sh

* More verbose dirty branch

* Simplify added verbosity
2021-05-10 01:08:53 +02:00
Gaeel Bradshaw-Rodriguez
e31af20466 Chown files to a custom user after building (fix file ownership) (#250)
* Chown files to a custom user after building

* Better describe `chownFilesTo` input

As suggested by @webbertakken: https://github.com/game-ci/unity-builder/pull/250#discussion_r624575666

Co-authored-by: Webber Takken <webber@takken.io>

* Simplify chown step in `build.sh`

Co-authored-by: Webber Takken <webber@takken.io>

Co-authored-by: Webber Takken <webber@takken.io>
2021-05-02 01:23:15 +02:00
Frostebite
a1f68ab26c hotfix - use input parameter instead of env var 2021-05-01 22:26:06 +01:00
Frostebite
e13a9f51e9 hotfix - use input parameter instead of env var 2021-05-01 22:25:10 +01:00
David Finol
7e7938581c Closes #243 (#249) 2021-04-23 17:30:09 -05:00
Frostebite
501c67e40c Implement AWS Fargate support [Large build support] (#246)
* Implement AWS Fargate support

* Update aws-tests workflow to include aws-ts-clean

* support remoteBuildCpu and remoteBuildContainer parameters for aws

* Syntax fix

* remove package-lock add yarn.lock

* yarn lock

* if: github.event.pull_request.draft == false

Co-authored-by: mdugdale <mark.dugdale@bossastudios.com>
2021-04-20 22:46:37 +02:00
Webber Takken
398eda622f Add Discord link in issues (#239) 2021-04-03 12:30:00 +02:00
dependabot[bot]
8bd212e020 Bump y18n from 4.0.0 to 4.0.1 (#237)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Webber Takken <webber@takken.io>
2021-04-02 11:13:37 +02:00
Sakari Bergen
8419046c0f Fix build script for Unity 2018, by using reflection instead of version defines (#238) 2021-04-02 11:11:56 +02:00
Markus
4d0b6e6db1 Pass on USYM_UPLOAD_AUTH_TOKEN if defined (#234)
To automatically upload symbols to unity, we need to define the `USYM_UPLOAD_AUTH_TOKEN` variable. Currently the build container ignores this variable, even if it's defined in the github action.

```
2021-03-26T02:35:35.5938747Z time="2021-03-26T02:35:35Z" level=fatal msg="Please provide an auth token with USYM_UPLOAD_AUTH_TOKEN environment variable"
```
2021-03-28 17:06:22 -05:00
Sakari Bergen
224f973562 Run default addressables build conditionally (#231)
* Add asmdef and Addressable content build in the builder

* Move asmdef content into its own directory

* Mark UnityBuilderAction as Editor-only
2021-03-19 18:50:39 +01:00
Webber Takken
b769675b38 Update repo url and status badges (#228)
* Update url in package.json

* Fix badges
2021-03-14 01:19:30 +01:00
Webber Takken
4fde4e47b6 Refactor action to typescript (#226)
* Refactor to typescript (config part)

* Refactor to typescript (convert extensions, minor fixes)

* Refactor to typescript (move from `action` to `dist`)

* Re-enable integrity-check for dist index.js

* Fix all tests and lints

* fix parsing major versions

* Test patch level to be digits only

* debug

* debug

* uncache

* manual compile

* debug

* debug

* Debug

* Build lib - doh

* remove diff check

* Make kubernetes workflow manual

* Properly generate 3 digit for simple major tags

* Remove ts-ignore

* re-enable cache
2021-03-14 00:44:01 +01:00
David Finol
0934b3f408 Create versioning.yml (#222)
* Create versioning.yml

* Apply suggestions from code review
2021-02-28 10:45:48 -06:00
David Finol
414307a791 Add newline to isShallow output (#216)
* Add newline to isShallow output
2021-02-13 01:40:19 -06:00
David Finol
faefe2f8d7 Only fetch if the repo is shallow (to avoid unnecessary errors) (#215)
* Only fetch if the repo is shallow (to avoid unnecessary errors)

* Update src/model/versioning.test.js
2021-02-12 23:22:23 -06:00
mob-sakai
b0df698630 Security (#214)
* fix(test): embed unity license

* fix(test): checkout head

* fix(test): use `pull_request` event instead of `pull_request_target` event

* fix(test): fix k8s test
2021-02-08 17:06:43 +01:00
David Finol
0d3b5a7a62 Update README.md (#213) 2021-02-06 20:04:40 -05:00
Cris Feo
555660c904 Clf support upm ssh keys (#211)
* make source changes

* compile index.js
2021-02-03 17:39:52 +01:00
David Finol
4fe037e06f Compile action/index.js 2021-01-26 15:18:24 -06:00
David Finol
05b7ccdc04 Remove debug from versioning (#206)
Would like to remove this debug option, as I don't like how it generates many unnecessary warnings, and I don't think it provides any value.
2021-01-26 12:54:07 -06:00
Webber Takken
c7c1841c97 split workflows (#203) 2021-01-23 11:39:42 +01:00
Webber Takken
2cec591baa Secure licenses (#202) 2021-01-23 11:30:46 +01:00
Webber
08e3347f47 Add cats 2021-01-23 10:30:23 +01:00
Webber Takken
89df68796c add activation workflow and set retention periods (#201)
* add activation workflow

* Trigger on push as well

* use specific version

* Set more sensible retention periods
2021-01-23 10:06:32 +01:00
Kai Biermeier
56b9864426 allow versions with -alpha,-rc,-rc.0 .... + don't fail build on version cannot be determined (#196)
Closes #163
2021-01-12 14:50:52 +01:00
Webber Takken
5b2e80e1a4 update deprecated workflow (#194) 2021-01-07 23:21:04 +01:00
marekvalenta
c8202c01e7 Pass buildOptions to the build with customParameters (#190)
* Update Builder.cs

* update of buildOptions

buildOptions should be taken into account for build

* missed name
2021-01-05 19:19:16 +01:00
David Finol
9f510401e2 Update CONTRIBUTING.md 2021-01-04 16:08:15 -06:00
David Finol
32acb22fec Default unityVersion to auto to use ProjectSettings/ProjectVersion.txt (#162) (#188) 2020-12-28 23:36:31 -06:00
Ivan Murashka
602b0b45d7 decode keystore to project folder (#186) 2020-12-11 18:55:53 +01:00
Webber Takken
9c804d98a0 Fix typo 2020-12-06 18:13:32 +01:00
Webber Takken
042fb6ae32 remove anything recognizable as Unity (#184) 2020-12-06 17:57:57 +01:00
David Finol
df7d1e1e25 Update index.js with linux-il2cpp fix (#181)
* Update index.js

* Update index.js with linux-il2cpp fix
2020-11-19 11:05:49 +01:00
David Finol
9707ad7ad5 Convert version major and minor to numbers (#180)
* Convert version major and minor to numbers

* fix linting error

Co-authored-by: Webber Takken <webber@takken.io>
2020-11-18 00:51:10 +01:00
Webber Takken
8eeb848483 add il2cpp support for linux from 2019.3 (#177) 2020-11-14 00:57:44 +01:00
Webber Takken
9e2a1b2d35 Remove duplicate flag batch-mode (#173) 2020-11-09 20:04:56 +01:00
Webber
471bf0bdf0 Merge branch 'BLaZeKiLL-fix/unity-alias' into main 2020-11-01 15:08:06 +01:00
Webber
6c2fbff839 Merge branch 'fix/unity-alias' of https://github.com/BLaZeKiLL/unity-builder into BLaZeKiLL-fix/unity-alias 2020-11-01 15:06:09 +01:00
Webber Takken
17c28995b2 Update action to use main (#168) 2020-10-29 23:21:48 +01:00
BLaZeKiLL
72ab50499d linux platform added 2020-10-24 13:09:01 +05:30
BLaZeKiLL
9269fba307 image tags updated 2020-10-24 12:13:29 +05:30
BLaZeKiLL
dc54ae10a5 Merge branch 'main' of https://github.com/webbertakken/unity-builder into fix/unity-alias 2020-10-22 23:51:43 +05:30
BLaZeKiLL
5417369dba action build 2020-10-22 23:44:36 +05:30
Devashish Lal
21c985b8e9 added -nographics flag to build.sh (#166) 2020-10-22 16:05:41 +02:00
BLaZeKiLL
483b784253 default docker repository updated to new docker repository 2020-10-22 18:24:42 +05:30
Kai Biermeier
e6d3daedbe revert Fix file ownership issues for self-hosted runners. (#141) (#165) 2020-10-22 10:20:12 +02:00
BLaZeKiLL
046ab3a72d -no-graphics flag removed from build script 2020-10-22 12:27:27 +05:30
BLaZeKiLL
ec0baa5d7b removed redundant xvfb calls (part of the alias) 2020-10-20 17:59:57 +05:30
BLaZeKiLL
5b8f3cf342 refactored to unity-editor alias 2020-10-20 17:29:34 +05:30
Webber Takken
ef74241772 Fix recursive path (#160) 2020-10-12 19:37:26 +02:00
dependabot[bot]
3d7e4a8018 Bump @actions/core from 1.2.4 to 1.2.6 (#158)
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.4 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-10-01 21:30:09 +02:00
Webber Takken
91da660786 remove artifacts older than 21 days (#157) 2020-09-28 19:19:18 +02:00
Webber Takken
f42f7923ed Add intructions for debugging (#154) 2020-09-27 21:44:14 +02:00
Webber Takken
22bc9a9bad Allow k8s workflow failures (#152) 2020-09-19 02:41:34 +02:00
Kai Biermeier
6a53a9e853 Solution proposal to Issue Add customImage parameter #150 (#151)
* add customImage attribute

* add one more test for input passing && check for customImage == ''
2020-09-18 18:41:31 +02:00
dependabot-preview[bot]
cccd5074ea [Security] Bump node-fetch from 2.6.0 to 2.6.1
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1. **This update includes a security fix.**
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-12 05:30:21 +00:00
Forrest Jones
977683cd5f Add buildVersion as action output (#144) (#145) 2020-08-27 02:24:33 +02:00
Webber Takken
89bdaa5e46 Add issue templates and pull request template (#142) 2020-08-22 22:03:44 +02:00
xanantis
24e9c186fd Fix file ownership issues for self-hosted runners. (#141) 2020-08-22 21:28:57 +02:00
Frostebite
92cfb31622 k8s retry delete during cleanup 2020-08-22 19:03:22 +01:00
Webber Takken
67b76584b8 Cleanup root dir (#133)
* Remove package-lock.json

* Move bootstrap logic into action folder

* Fix relative path

* update index after rebase

* Shell files are executable

* Update yarn.lock

* Update yarn.lock
2020-08-22 19:17:02 +02:00
xanantis
3ee15170fd Use RUNNER_TEMP environment variable instead of a hardcoded path (#138) 2020-08-22 17:59:08 +02:00
Justin Spahr-Summers
3e0842dda0 Rename custom -version flag to -buildVersion (#137)
* Rename custom -version flag to -customProjectVersion

* Rename flag to -buildVersion
2020-08-16 21:09:34 +02:00
Benoit Dion
1f8d196ed0 Fix boolean logic (#129) 2020-08-10 16:30:06 +02:00
dependabot[bot]
e003f9e2ca Bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-08-09 21:46:16 +02:00
Frostebite
21634107c1 K8s Feature (#124)
Adds the ability to use a kubernetes container to run builds that are too large for the local machine running the unity-builder. Logs are streamed back during the build. Build results can then be downloaded separately.
2020-08-09 20:27:47 +01:00
Webber
196fe8fc5b Move docs to unity-ci.com 2020-07-11 15:53:20 +02:00
dogboydog
ec0cde0c85 avoid double logging of git diff 2020-07-09 13:31:51 +02:00
dogboydog
72ff2983a1 test with short max diff lines 2020-07-09 13:31:51 +02:00
dogboydog
fdf71758a9 use System.run for logging Git diff 2020-07-09 13:31:51 +02:00
dogboydog
91ec427695 make logging of git diff unconditional, remove parameter 2020-07-09 13:31:51 +02:00
dogboydog
6fb8550919 increase code coverage with versioning.test.js 2020-07-09 13:31:51 +02:00
dogboydog
cb913cd286 Initial implementation of logDiffIfDirty 2020-07-09 13:31:51 +02:00
Webber
96eeaf940a Remove androidVersionCode from default workflow 2020-07-08 20:07:03 +02:00
David Finol
6ece6447b2 Add Android Build Settings 2020-07-06 11:53:40 +02:00
Benoit Dion
3523c6a934 Document additional action inputs
This helps avoid warnings when using previously undocumented inputs
2020-06-25 18:14:32 +02:00
Webber
bf702784d2 cleanup workflow 2020-06-25 00:57:16 +02:00
Benoit Dion
bdc3a88d22 Add input to set version code
Use action input `androidVersionCode` when provided. Generate the androidVersionCode from the version otherwise.
2020-06-25 00:33:25 +02:00
Benoit Dion
401ddcaae0 Add support for android builds
The emoji in the github action name exposed as a env variable through docker was causing a gradle crash 😢.
2020-06-20 10:08:08 +02:00
Benoit Dion
1245bfefc8 Fix fork PR builds
Remove hardcoded reference to the `origin` remote and instead implictly use the current commit or ref
2020-06-20 00:59:05 +02:00
Nathan Leiby
229b0d02f8 Adding logging before updating permissions 2020-06-13 22:48:49 +02:00
Nathan Leiby
c68bdf8177 make StandaloneOSX app runnable 2020-06-13 22:48:49 +02:00
Webber
938926799f Remove WebGL for faster CI 2020-06-13 17:06:03 +02:00
Webber
5efb4868ad Comment out activation 2020-06-13 17:06:03 +02:00
Webber
7749b8862d Add matrix support for multi license 2020-06-13 17:06:03 +02:00
Webber
98a56c4169 Add 2019.3.15 workflow 2020-06-13 17:06:03 +02:00
Webber
720ee0c896 Acquire activation files 2020-06-13 17:06:03 +02:00
Webber
d42c251af3 Snyk badge really almost never works, bye 2020-05-23 02:22:55 +02:00
Webber
bfe6be7ce2 Update readme for v1.0 🎉 2020-05-23 00:25:26 +02:00
Webber
f15f40d265 Use head for tags 2020-05-22 23:01:58 +02:00
Webber
866f364f64 Use ref instead of tag vs branch 2020-05-22 23:01:58 +02:00
Webber
a245f08e75 rename to throwContextualError 2020-05-22 23:01:58 +02:00
Webber
21c211bbdd rebase on master 2020-05-22 23:01:58 +02:00
Webber
3718e05961 Describe errors in System.run 2020-05-22 23:01:58 +02:00
Webber
0159028bb1 Fix missing await 2020-05-22 23:01:58 +02:00
Webber
054c6bfab3 Catch command for in-shell errors 2020-05-22 23:01:58 +02:00
Webber
8c9ff3249e More info if command gives no output, just the exit code. 2020-05-22 23:01:58 +02:00
Webber
7386c669ad Fix no output from errors 2020-05-22 23:01:58 +02:00
Webber
ce865270c4 Use commit-ish for git description 2020-05-22 23:01:58 +02:00
Webber
7e17091251 Split responsibilities between Input and BuildParameters models 2020-05-22 00:55:26 +02:00
Webber
02ff5bbef2 Add documentation and tests for allowDirtyBuild 2020-05-22 00:55:26 +02:00
Webber
8c177b1bad Add flag for allowing dirty branch 2020-05-22 00:55:26 +02:00
Webber
699621ed21 Run versioning commands in projectPath instead 2020-05-21 14:26:37 +02:00
Webber
44bde7feb9 Base number of commits off of the branch on origin 2020-05-02 16:37:24 +02:00
Webber
5328bda08e Base number of commits off of the branch 2020-05-02 16:37:24 +02:00
Webber
34e4b86924 Fix case where no tags does not trigger false 2020-05-01 20:32:41 +02:00
Webber
e9514b4e37 Stop hammering patches 🔨 2020-05-01 17:55:27 +02:00
Webber
d4d91e75c3 Configure codecov threshold 2020-05-01 17:55:27 +02:00
Webber
2085eff264 Add missing test for ref getters 2020-05-01 17:55:27 +02:00
Webber
98a1b078fc Update styles to latest unicorn 🦄 and prettier 🦋 2020-05-01 17:55:27 +02:00
Webber
afef854ea0 update packages to latest 2020-05-01 17:55:27 +02:00
Webber
a0a5de2a83 Cover all versioning paths 2020-05-01 16:15:56 +02:00
Webber
c146049b33 Mock all output methods from core 2020-05-01 16:15:56 +02:00
Webber
e46399169f Add tests for System model 2020-05-01 16:15:56 +02:00
Webber
b41026b36e Introduce smart fetching, based on type of local repo. 2020-05-01 16:15:56 +02:00
Webber
cd1d215dfa Remove unshallow fetch 2020-05-01 16:15:56 +02:00
Webber
d01e844eea Fix versioning for push event. 2020-05-01 16:15:56 +02:00
Webber
40564afbaf Fix failed test 2020-04-28 02:02:34 +02:00
Webber
b6f8040f4a Add tests for the versioning model 2020-04-28 02:02:34 +02:00
Webber
22c7d0e516 Improve versioning readme 📜 2020-04-26 21:45:10 +02:00
Webber
f85e50e499 Fix bug in hasAnyVersionTags 🐜 2020-04-26 21:45:10 +02:00
Webber
d75d7890d0 Implement versioning strategies in js 🧉 2020-04-26 21:45:10 +02:00
Webber
2e81e61af3 Add additional tests 🧪 2020-04-26 21:45:10 +02:00
Webber
ac76e9d562 Update readme with versioning examples 🧉 2020-04-26 21:45:10 +02:00
Webber
39a160b789 Allow versioning and version parameters. 2020-04-26 21:45:10 +02:00
Webber
e8a2eaad72 Cleanup default-build-script 2020-04-26 21:45:10 +02:00
Webber
6f1d03d8a8 Refactor Builder 2020-04-26 21:45:10 +02:00
Webber
5ee9c59113 Create VersionApplicator 2020-04-26 21:45:10 +02:00
Webber
03510d4a55 Abstract out the stdout reporter 2020-04-26 21:45:10 +02:00
Webber
ad65b0ece4 Abstract out the argument parser 2020-04-26 21:45:10 +02:00
Webber
a513e5b640 Add semantic versioning logic 2020-04-26 21:45:10 +02:00
Webber
328b0d8ac0 Add system extension for Process 2020-04-26 21:45:10 +02:00
Webber
e53dcf13e3 Add .editorconfig for the default-build-script project 2020-04-26 21:45:10 +02:00
dependabot-preview[bot]
3338b392a0 [Security] Bump acorn from 6.4.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-13 22:32:17 +00:00
dependabot-preview[bot]
7e115b5cc3 Bump eslint-plugin-unicorn from 17.0.1 to 17.1.0
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 17.0.1 to 17.1.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v17.0.1...v17.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 18:22:23 +00:00
dependabot-preview[bot]
758108295c Bump eslint-plugin-react from 7.18.3 to 7.19.0
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.18.3 to 7.19.0.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.18.3...v7.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-10 09:00:11 +00:00
Webber
8684472273 install deps during build phase 2020-03-09 23:47:22 +01:00
Webber
38b6a42f5e fix dist file 2020-03-09 23:47:22 +01:00
litefeel
fbeaf77867 Apply merge request suggestions 2020-03-09 23:23:53 +01:00
litefeel
6f3a2bd992 Fixed compatibility 2020-03-09 23:23:53 +01:00
litefeel
e1eda1e876 Change UNITY_LICENSE_PATH to UNITY_LICENSE_FILE 2020-03-09 23:23:53 +01:00
litefeel
0088ca3094 Add UNITY_LICENSE_PATH 2020-03-09 23:23:53 +01:00
dependabot-preview[bot]
465f15a945 Bump eslint-plugin-unicorn from 16.1.1 to 17.0.1
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 16.1.1 to 17.0.1.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v16.1.1...v17.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-09 21:53:00 +00:00
dependabot-preview[bot]
ffe381e28a Bump @babel/core from 7.8.6 to 7.8.7
Bumps [@babel/core](https://github.com/babel/babel) from 7.8.6 to 7.8.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.8.6...v7.8.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-05 15:36:08 +00:00
dependabot-preview[bot]
085359d24f Bump @babel/preset-env from 7.8.6 to 7.8.7
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.8.6 to 7.8.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.8.6...v7.8.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-05 15:26:03 +00:00
dependabot-preview[bot]
b47dcdab84 Bump @babel/core from 7.8.4 to 7.8.6
Bumps [@babel/core](https://github.com/babel/babel) from 7.8.4 to 7.8.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.8.4...v7.8.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-28 09:18:56 +00:00
dependabot-preview[bot]
0c23c7d0a3 Bump @babel/preset-env from 7.8.4 to 7.8.6
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.8.4 to 7.8.6.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.8.4...v7.8.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-28 09:09:38 +00:00
dependabot-preview[bot]
f3099b6226 Bump lint-staged from 10.0.7 to 10.0.8
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.7 to 10.0.8.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.7...v10.0.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-28 09:00:06 +00:00
dependabot-preview[bot]
a969d3322f Bump babel-eslint from 10.0.3 to 10.1.0
Bumps [babel-eslint](https://github.com/babel/babel-eslint) from 10.0.3 to 10.1.0.
- [Release notes](https://github.com/babel/babel-eslint/releases)
- [Commits](https://github.com/babel/babel-eslint/compare/v10.0.3...v10.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-27 23:02:57 +00:00
dependabot-preview[bot]
8f63acf12b Bump @actions/github from 2.1.0 to 2.1.1
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-21 08:40:38 +00:00
Webber
1813ee2895 add dist build 2020-02-15 18:02:01 +01:00
dependabot-preview[bot]
6e377601bf Bump @zeit/ncc from 0.21.0 to 0.21.1
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.21.0 to 0.21.1.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.21.0...0.21.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-15 18:02:01 +01:00
dependabot-preview[bot]
f7321735d5 Bump husky from 4.2.2 to 4.2.3
Bumps [husky](https://github.com/typicode/husky) from 4.2.2 to 4.2.3.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v4.2.2...v4.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-13 08:13:42 +00:00
dependabot-preview[bot]
19429bf324 Bump eslint-plugin-unicorn from 16.0.0 to 16.1.1
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 16.0.0 to 16.1.1.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v16.0.0...v16.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 11:37:51 +01:00
dependabot-preview[bot]
04eaffcd1f Bump husky from 4.2.1 to 4.2.2
Bumps [husky](https://github.com/typicode/husky) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v4.2.1...v4.2.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-12 09:52:47 +01:00
Webber
2c1ef01beb Update readme to reflect v0.11 2020-02-11 20:59:27 +01:00
Webber
dfccf539d1 Add custom parameters to test workflow 2020-02-11 20:59:27 +01:00
Webber
c1a7c5f70b Separate custom parameters 2020-02-11 20:59:27 +01:00
dependabot-preview[bot]
7e4851cc3a Bump @zeit/ncc from 0.20.5 to 0.21.0
Bumps [@zeit/ncc](https://github.com/zeit/ncc) from 0.20.5 to 0.21.0.
- [Release notes](https://github.com/zeit/ncc/releases)
- [Commits](https://github.com/zeit/ncc/compare/0.20.5...0.21.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 13:55:58 +01:00
dependabot-preview[bot]
bbb5661b43 Bump husky from 4.0.0-beta.5 to 4.2.1
Bumps [husky](https://github.com/typicode/husky) from 4.0.0-beta.5 to 4.2.1.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v4.0.0-beta.5...v4.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 13:04:47 +01:00
dependabot-preview[bot]
678fb210be Bump eslint-plugin-flowtype from 4.5.2 to 4.6.0
Bumps [eslint-plugin-flowtype](https://github.com/gajus/eslint-plugin-flowtype) from 4.5.2 to 4.6.0.
- [Release notes](https://github.com/gajus/eslint-plugin-flowtype/releases)
- [Commits](https://github.com/gajus/eslint-plugin-flowtype/compare/v4.5.2...v4.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 11:34:58 +01:00
dependabot-preview[bot]
90af9768a7 Bump eslint from 6.7.2 to 6.8.0
Bumps [eslint](https://github.com/eslint/eslint) from 6.7.2 to 6.8.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.7.2...v6.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-11 10:23:53 +01:00
dependabot-preview[bot]
6ab433b631 Bump @babel/core from 7.7.5 to 7.8.4
Bumps [@babel/core](https://github.com/babel/babel) from 7.7.5 to 7.8.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.7.5...v7.8.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 17:55:59 +01:00
dependabot-preview[bot]
d5c4c09fc4 Bump lint-staged from 9.5.0 to 10.0.7
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 9.5.0 to 10.0.7.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v9.5.0...v10.0.7)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 17:38:42 +01:00
dependabot-preview[bot]
3e69d63ec4 Bump eslint-config-prettier from 6.7.0 to 6.10.0
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.7.0 to 6.10.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/commits/v6.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 17:13:29 +01:00
dependabot-preview[bot]
c47d5a4d2e Bump eslint-plugin-react from 7.17.0 to 7.18.3
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.17.0 to 7.18.3.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.17.0...v7.18.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 16:49:56 +01:00
dependabot-preview[bot]
9dd75201b0 Bump eslint-plugin-import from 2.19.1 to 2.20.1
Bumps [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) from 2.19.1 to 2.20.1.
- [Release notes](https://github.com/benmosher/eslint-plugin-import/releases)
- [Changelog](https://github.com/benmosher/eslint-plugin-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/benmosher/eslint-plugin-import/compare/v2.19.1...v2.20.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-10 14:16:53 +01:00
Webber
308a9e173d fix: upgrade @actions/github from 2.0.0 to 2.0.1 2020-02-09 16:04:51 +01:00
snyk-bot
f5a61eed4a fix: upgrade @actions/exec from 1.0.2 to 1.0.3
Snyk has created this PR to upgrade @actions/exec from 1.0.2 to 1.0.3.

See this package in NPM:
https://www.npmjs.com/package/@actions/exec

See this project in Snyk:
https://app.snyk.io/org/webbertakken/project/e69ca31d-f4f2-4223-ae93-0245ffac3626?utm_source=github&utm_medium=upgrade-pr
2020-02-09 10:28:35 +01:00
Webber
051513bf4a Sort badges by color ugliness 🦄 2020-02-09 01:53:32 +01:00
Webber
d9382df690 put badges on 1 line 2020-02-09 01:53:32 +01:00
Webber
0df7fa7855 Add badges for lgtm, codecov, snyk 2020-02-09 01:24:03 +01:00
Webber
d1c1d276e0 Add token as env, so PRs will trigger codecov 2020-02-09 01:24:03 +01:00
Webber
ad1f47dd3a Set token in runner env 2020-02-09 01:24:03 +01:00
Webber
a0d197e1fa Integrate codecov 2020-02-09 01:24:03 +01:00
Webber
cc244fa58b Add updated index.js 2020-02-08 19:25:58 +01:00
dependabot-preview[bot]
c70fdac383 Bump @actions/core from 1.2.0 to 1.2.2
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.0 to 1.2.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/master/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-08 19:25:58 +01:00
dependabot-preview[bot]
81487e2140 Bump @babel/preset-env from 7.7.7 to 7.8.4
Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.7.7 to 7.8.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.7.7...v7.8.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-08 19:09:38 +01:00
dependabot-preview[bot]
ef06de9255 Bump jest from 24.9.0 to 25.1.0
Bumps [jest](https://github.com/facebook/jest) from 24.9.0 to 25.1.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/compare/v24.9.0...v25.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-08 18:50:59 +01:00
dependabot-preview[bot]
64499d66cc Bump eslint-plugin-unicorn from 14.0.1 to 16.0.0
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 14.0.1 to 16.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v14.0.1...v16.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-08 17:34:17 +01:00
dependabot-preview[bot]
59ab903a78 Bump @babel/cli from 7.7.5 to 7.8.4
Bumps [@babel/cli](https://github.com/babel/babel) from 7.7.5 to 7.8.4.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/compare/v7.7.5...v7.8.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-08 15:12:50 +01:00
Webber Takken
2fa5b33111 Update README.md 2020-02-01 21:24:33 +01:00
Webber
0399609b07 Give more info about what is different 2020-02-01 21:02:56 +01:00
Webber
1c91a3bf31 Fix custom parameters 2020-02-01 21:02:56 +01:00
Webber
ae7f659e9f Remove unneeded trailing slash 2020-02-01 20:43:49 +01:00
Webber
b781b891ec Align diff test with rename 2020-02-01 20:43:49 +01:00
Webber
f3a984165e Rename builder folder to action folder (unity actions convention) 2020-02-01 20:43:49 +01:00
Webber
d8896dc4f5 Update references 2020-01-27 23:15:26 +01:00
Webber
4051832dc0 Add some more basic tests 🤷‍♂️ 2020-01-27 23:15:26 +01:00
Webber
fe2311ef4b Hint enabling cache if not already enabled. 2020-01-27 23:15:26 +01:00
Webber
37d5ce498f Add more complete steps to create workflow 2020-01-27 23:15:26 +01:00
158 changed files with 219975 additions and 3945 deletions

View File

@@ -2,4 +2,4 @@
*
# Files required for the action
!builder/
!dist/

View File

@@ -6,7 +6,7 @@ end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 100
max_line_length = 120
tab_width = 2
trim_trailing_whitespace = true

View File

@@ -1,2 +1,4 @@
**/node_modules/**
**/builder/**
dist/
lib/
node_modules/
jest.config.js

View File

@@ -1,21 +1,19 @@
{
"parser": "babel-eslint",
"plugins": ["jest", "@typescript-eslint", "prettier", "unicorn"],
"extends": ["plugin:unicorn/recommended", "plugin:github/recommended", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module"
},
"env": {
"node": true,
"es6": true,
"jest": true
"jest/globals": true
},
"parserOptions": {
"ecmaVersion": 2020,
"ecmaFeatures": {
"impliedStrict": true
}
},
"extends": ["airbnb", "plugin:unicorn/recommended", "prettier"],
"plugins": ["react", "jsx-a11y", "import", "prettier", "flowtype", "unicorn"],
"settings": { "react": { "version": "latest" } },
"rules": {
"prettier/prettier": "error",
"import/no-extraneous-dependencies": 0
"import/no-extraneous-dependencies": 0,
"import/no-namespace": "off"
}
}

3
.gitattributes vendored Normal file
View File

@@ -0,0 +1,3 @@
dist/index* -diff linguist-generated=true
dist/licenses* -diff linguist-generated=true
dist/sourcemap* -diff linguist-generated=true

12
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: game-ci
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

25
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,25 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Bug description**
<!--A clear and concise description of what the bug is.-->
**How to reproduce**
<!--Steps to reproduce the behavior:-->
-
**Expected behavior**
<!--A clear and concise description of what you expected to happen.-->
**Additional details**
<!--Please add context, links, reasons, screenshots, etc.-->

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Discuss on Discord
url: https://game.ci/discord
about: Join our Discord community

View File

@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an improvement, or a new feature
title: ''
labels: enhancement
assignees: ''
---
**Context**
<!--Please describe a proper context-->
**Suggested solution**
<!--Tell us what you would suggest-->
**Considered alternatives**
<!--Please add any alternative solutions that you have considered-->
**Additional details**
<!--Please add context, links, reasons, screenshots, etc.-->

7
.github/ISSUE_TEMPLATE/other.md vendored Normal file
View File

@@ -0,0 +1,7 @@
---
name: Other
about: Everything else
title: ''
labels: ''
assignees: ''
---

11
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,11 @@
#### Changes
- ...
#### Checklist
<!-- please check all items and add your own -->
- [x] Read the contribution [guide](../CONTRIBUTING.md) and accept the [code](../CODE_OF_CONDUCT.md) of conduct
- [ ] Readme (updated or not needed)
- [ ] Tests (added, updated or not needed)

20
.github/workflows/activation.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Acquire activation file
on:
workflow_dispatch:
jobs:
activation:
name: Request manual activation file 🔑
runs-on: ubuntu-latest
steps:
# Request manual activation file
- name: Unity - Request Activation File
id: requestActivationFile
uses: game-ci/unity-request-activation-file@v2.0-alpha-1
- name: Upload activation file
uses: actions/upload-artifact@v2
with:
name: ${{ steps.requestActivationFile.outputs.filePath }}
path: ${{ steps.requestActivationFile.outputs.filePath }}
retention-days: 3

60
.github/workflows/aws-tests.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: AWS
on:
push: { branches: [aws, remote-builder/refactor] }
env:
AWS_REGION: 'eu-west-1'
jobs:
buildForAllPlatforms:
name: AWS Fargate Build
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- test-project
unityVersion:
# - 2019.2.11f1
- 2019.3.15f1
targetPlatform:
#- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
#- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
#- iOS # Build an iOS player.
#- Android # Build an Android .apk.
#- WebGL # WebGL.
# - StandaloneWindows # Build a Windows standalone.
# - WSAPlayer # Build an Windows Store Apps player.
# - PS4 # Build a PS4 Standalone.
# - XboxOne # Build a Xbox One Standalone.
# - tvOS # Build to Apple's tvOS platform.
# - Switch # Build a Nintendo Switch player
# steps
steps:
- name: Checkout (default)
uses: actions/checkout@v2
if: github.event.event_type != 'pull_request_target'
with:
lfs: true
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2
- uses: ./
id: aws-fargate-unity-build
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-2
with:
remoteBuildCluster: aws
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

73
.github/workflows/build-tests.yml vendored Normal file
View File

@@ -0,0 +1,73 @@
name: Builds
on:
push: { branches: [main] }
pull_request:
paths-ignore:
- '.github/**'
env:
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
jobs:
buildForAllPlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- test-project
unityVersion:
- 2019.2.11f1
- 2019.3.15f1
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
- iOS # Build an iOS player.
- Android # Build an Android .apk.
- WebGL # WebGL.
# - StandaloneWindows # Build a Windows standalone.
# - WSAPlayer # Build an Windows Store Apps player.
# - PS4 # Build a PS4 Standalone.
# - XboxOne # Build a Xbox One Standalone.
# - tvOS # Build to Apple's tvOS platform.
# - Switch # Build a Nintendo Switch player
steps:
###########################
# Checkout #
###########################
- uses: actions/checkout@v2
with:
lfs: true
###########################
# Cache #
###########################
- uses: actions/cache@v2
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-
Library-
###########################
# Build #
###########################
- uses: ./
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
###########################
# Upload #
###########################
- uses: actions/upload-artifact@v2
with:
name: Build (${{ matrix.unityVersion }})
path: build
retention-days: 14

16
.github/workflows/cats.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
name: Cats 😺
on:
pull_request_target:
types:
- opened
- reopened
jobs:
aCatForCreatingThePullRequest:
name: A cat for your effort!
runs-on: ubuntu-latest
steps:
- uses: ruairidhwm/action-cats@1.0.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

14
.github/workflows/cleanup.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: Cleanup (cron)
on:
schedule:
- cron: '30 10 * * SUN' # every sunday at 10:30
jobs:
deleteArtifacts:
runs-on: ubuntu-latest
steps:
- name: Delete old artifacts
uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 21 days

24
.github/workflows/integrity-check.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
name: Integrity
on:
push: { branches: [main] }
pull_request: {}
env:
CODECOV_TOKEN: '2f2eb890-30e2-4724-83eb-7633832cf0de'
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12.x
- run: yarn
- run: yarn lint
- run: yarn test --coverage
- run: bash <(curl -s https://codecov.io/bash)
- run: yarn build || { echo "build command should always succeed" ; exit 61; }
# - run: yarn build --quiet && git diff --quiet dist || { echo "dist should be auto generated" ; git diff dist ; exit 62; }

80
.github/workflows/kubernetes-tests.yml vendored Normal file
View File

@@ -0,0 +1,80 @@
name: Kubernetes
on:
workflow_dispatch: {}
# push: { branches: [main] }
# pull_request:
# paths-ignore:
# - '.github/**'
env:
GKE_ZONE: 'us-central1-c'
GKE_REGION: 'us-central1'
GKE_PROJECT: 'unitykubernetesbuilder'
GKE_CLUSTER: 'unity-builder-cluster'
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"576562626572264761624c65526f7578\"/>\n <Binding Key=\"2\" Value=\"576562626572264761624c65526f7578\"/>\n </MachineBindings>\n <MachineID Value=\"D7nTUnjNAmtsUMcnoyrqkgIbYdM=\"/>\n <SerialHash Value=\"2033b8ac3e6faa3742ca9f0bfae44d18f2a96b80\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUJHUlgtWEQ0RS1aQ1dWLUM1SlctR0RIQg==\"/>\n <SerialMasked Value=\"F4-BGRX-XD4E-ZCWV-C5JW-XXXX\"/>\n <StartDate Value=\"2021-02-08T00:00:00\"/>\n <UpdateDate Value=\"2021-02-09T00:34:57\"/>\n <InitialActivationDate Value=\"2021-02-08T00:34:56\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2018.4.30f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n <Entitlement Ns=\"unity_editor\" Tag=\"DarkSkin\" Type=\"EDITOR_FEATURE\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>m0Db8UK+ktnOLJBtHybkfetpcKo=</DigestValue></Reference></SignedInfo><SignatureValue>o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw==</SignatureValue></Signature></root>"
jobs:
k8sBuilds:
name: K8s build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
targetPlatform:
- StandaloneLinux64
- StandaloneWindows64
steps:
###########################
# Checkout #
###########################
- uses: actions/checkout@v2
with:
lfs: true
###########################
# Spin up #
###########################
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '288.0.0'
service_account_email: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
- run: ./dist/bootstrapper/ApplyClusterAndAcquireLock.sh ${{ env.GKE_PROJECT }} ${{ env.GKE_CLUSTER }} ${{ env.GKE_ZONE }}
###########################
# Build #
###########################
- uses: frostebite/File-To-Base64@master
id: read-base64
with:
filePath: ~/.kube/config
- uses: ./
id: k8s-unity-build
with:
targetPlatform: ${{ matrix.targetPlatform }}
kubeConfig: ${{ steps.read-base64.outputs.base64 }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectPath: test-project
unityVersion: 2019.3.15f1
###########################
# Upload #
###########################
- uses: frostebite/K8s-Download-Volume@master
with:
kubeConfig: ${{ steps.read-base64.outputs.base64 }}
volume: ${{ steps.k8s-unity-build.outputs.volume }}
sourcePath: repo/build/
- uses: actions/upload-artifact@v2
with:
name: Kubernetes Build (${{ matrix.targetPlatform }})
path: k8s-volume-download
retention-days: 14
###########################
# Spin down #
###########################
- run: ./dist/bootstrapper/ReleaseLockAndAttemptShutdown.sh ${{ env.GKE_PROJECT }} ${{ env.GKE_CLUSTER }} ${{ env.GKE_ZONE }}
if: ${{ always() }}

View File

@@ -1,67 +0,0 @@
name: Actions 😎
on:
pull_request: {}
push: { branches: [master] }
env:
UNITY_LICENSE: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>\n <License id=\"Terms\">\n <MachineBindings>\n <Binding Key=\"1\" Value=\"d39b8e2f4d364b2e98b06afa0c6e08c5\"/>\n <Binding Key=\"2\" Value=\"d39b8e2f4d364b2e98b06afa0c6e08c5\"/>\n </MachineBindings>\n <MachineID Value=\"Xxo1ZKbdPu/IATrc0mPBYANJFF0=\"/>\n <SerialHash Value=\"1efd68fa935192b6090ac03c77d289a9f588c55a\"/>\n <Features>\n <Feature Value=\"33\"/>\n <Feature Value=\"1\"/>\n <Feature Value=\"12\"/>\n <Feature Value=\"2\"/>\n <Feature Value=\"24\"/>\n <Feature Value=\"3\"/>\n <Feature Value=\"36\"/>\n <Feature Value=\"17\"/>\n <Feature Value=\"19\"/>\n <Feature Value=\"62\"/>\n </Features>\n <DeveloperData Value=\"AQAAAEY0LUg2WFMtUE00NS1SM0M4LUUyWlotWkdWOA==\"/>\n <SerialMasked Value=\"F4-H6XS-PM45-R3C8-E2ZZ-XXXX\"/>\n <StartDate Value=\"2018-05-02T00:00:00\"/>\n <UpdateDate Value=\"2019-11-25T18:23:38\"/>\n <InitialActivationDate Value=\"2018-05-02T14:21:28\"/>\n <LicenseVersion Value=\"6.x\"/>\n <ClientProvidedVersion Value=\"2019.2.11f1\"/>\n <AlwaysOnline Value=\"false\"/>\n <Entitlements>\n <Entitlement Ns=\"unity_editor\" Tag=\"UnityPersonal\" Type=\"EDITOR\" ValidTo=\"9999-12-31T00:00:00\"/>\n </Entitlements>\n </License>\n<Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><SignedInfo><CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\"/><SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\"/><Reference URI=\"#Terms\"><Transforms><Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\"/></Transforms><DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\"/><DigestValue>JHdOBFmBNq2H8BrGFzir/StLoYo=</DigestValue></Reference></SignedInfo><SignatureValue>aENLHd37a51RtP2/g7YU0Pexf5mx0/ENXYGtrPzqwZ8NQt2AsSdxGnl0CUB45/GuNXfJVDt2HWot\ncNYZB2OylVBn1WHQbKZlPmm8gEAMz0MYbr4Isb5i5buryBrZlmbEOjnRI+pEg1CBwlgMo6xdtjjE\n/d7cC293QIUO91kdzRXftYou1dNaUyuPL9ZH65vdB2pDXGRNxgUVD+GnnqZA7b5L2HXqNQclcWAK\n5Yd1BeF3VzR1iLw9G/SmH5oOhnpXSmqbL4qk7LVP2/mgXpFk5kP4X8VC3z47obNhBIGq40dwWyEe\nUYk5/nRAOkZawDT+tcu96e06gPC9Cxk5PdbRbA==</SignatureValue></Signature></root>"
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12.x
- run: yarn
- run: yarn lint
- run: yarn test
- run: yarn build || { echo "build command should always succeed" ; exit 61; }
- run: yarn build --quiet && git diff --quiet builder || { echo "builder should be auto generated" ; exit 62; }
buildForAllPlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- test-project
unityVersion:
- 2019.2.11f1
# - 2019.3.0f1 # requires different license file/method
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
- iOS # Build an iOS player.
# - Android # Build an Android .apk standalone app.
- WebGL # WebGL.
# - WSAPlayer # Build an Windows Store Apps player.
# - PS4 # Build a PS4 Standalone.
# - XboxOne # Build a Xbox One Standalone.
# - tvOS # Build to Apple's tvOS platform.
# - Switch # Build a Nintendo Switch player.
steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1.1.0
with:
path: ${{ matrix.projectPath }}/Library
key: Library-${{ matrix.projectPath }}-${{ matrix.targetPlatform }}
restore-keys: |
Library-${{ matrix.projectPath }}-
Library-
- uses: ./
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v1
with:
name: Build
path: build

14
.github/workflows/versioning.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: Versioning
on:
release:
types: [published, edited]
jobs:
updateMajorTag:
name: Update major tag
runs-on: ubuntu-latest
steps:
- uses: Actions-R-Us/actions-tagger@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
.idea
node_modules
coverage/
lib/

View File

@@ -2,5 +2,5 @@
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
"printWidth": 120
}

View File

@@ -1,3 +1,3 @@
save-prefix ""
save-prefix "^"
--install.audit true
--add.audit true

View File

@@ -19,7 +19,7 @@ When fixing a bug it is fine to submit a pull request right away.
Steps to be performed to submit a pull request:
1. Fork the repository and create your branch from `master`.
1. Fork the repository and create your branch from `main`.
2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Fill out the description, link any related issues and submit your pull request.

201
README.md
View File

@@ -1,193 +1,54 @@
# Unity - Builder
[![Actions status](https://github.com/webbertakken/unity-builder/workflows/Actions%20%F0%9F%98%8E/badge.svg?event=push&branch=master)](https://github.com/webbertakken/unity-builder/actions?query=branch%3Amaster+event%3Apush+workflow%3A%22Actions+%F0%9F%98%8E%22)
---
(Not affiliated with Unity Technologies)
GitHub Action to
[build Unity projects](https://github.com/marketplace/actions/unity-builder)
for different platforms.
Part of the
[Unity Actions](https://github.com/webbertakken/unity-actions)
collection.
Part of the <a href="https://game.ci">GameCI</a> open source project.
<br />
<br />
---
[![Actions status](https://github.com/game-ci/unity-builder/workflows/Builds/badge.svg?event=push&branch=main)](https://github.com/game-ci/unity-builder/actions?query=branch%3Amain+event%3Apush+workflow%3A%22Builds)
[![lgtm - code quality](https://img.shields.io/lgtm/grade/javascript/g/webbertakken/unity-builder.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/webbertakken/unity-builder/context:javascript)
[![codecov - test coverage](https://codecov.io/gh/game-ci/unity-builder/branch/master/graph/badge.svg)](https://codecov.io/gh/game-ci/unity-builder)
<br />
<br />
[Github Action](https://github.com/features/actions)
to build Unity projects for different platforms.
## How to use
It is recommended to run the
[Test](https://github.com/webbertakken/unity-actions#test)
action from the
[Unity Actions](https://github.com/webbertakken/unity-actions)
collection before running this action. This action also requires the [Activation](https://github.com/marketplace/actions/unity-activate) step.
Find the
[docs](https://game.ci/docs/github/builder)
on the GameCI
[documentation website](https://game.ci/docs).
## Documentation
## Related actions
See the
[Unity Actions](https://github.com/webbertakken/unity-actions)
collection repository for workflow documentation and reference implementation.
Visit the
GameCI <a href="https://github.com/game-ci/unity-actions">Unity Actions</a>
status repository for related Actions.
## Usage
## Community
Create or edit the file called `.github/workflows/main.yml` and add a job to it.
Feel free to join us on
<a href="http://game.ci/discord"><img height="30" src="media/Discord-Logo.svg" alt="Discord" /></a>
and engage with the community.
```yaml
- uses: webbertakken/unity-builder@v0.9
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: path/to/your/project
unityVersion: 2020.X.XXXX
targetPlatform: WebGL
```
## Contributing
A complete workflow that builds every available platform could look like this:
To help improve the documentation, please find the docs [repository](https://github.com/game-ci/documentation).
```yaml
name: Build project
To contribute to Unity Builder, kindly read the [contribution guide](./CONTRIBUTING.md).
on:
pull_request: {}
push: { branches: [master] }
## Support us
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
GameCI is free for everyone forever.
jobs:
buildForSomePlatforms:
name: Build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
projectPath:
- path/to/your/project
unityVersion:
- 2019.2.11f1
- 2019.3.0f1
targetPlatform:
- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- StandaloneWindows # Build a Windows standalone.
- StandaloneWindows64 # Build a Windows 64-bit standalone.
- StandaloneLinux64 # Build a Linux 64-bit standalone.
- iOS # Build an iOS player.
- Android # Build an Android .apk standalone app.
- WebGL # WebGL.
- WSAPlayer # Build an Windows Store Apps player.
- PS4 # Build a PS4 Standalone.
- XboxOne # Build a Xbox One Standalone.
- tvOS # Build to Apple's tvOS platform.
- Switch # Build a Nintendo Switch player.
steps:
- uses: actions/checkout@v1
- uses: webbertakken/unity-builder@v0.9
with:
projectPath: ${{ matrix.projectPath }}
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v1
with:
name: Build
path: build
```
> **Notes:**
>
> - Don't forget to replace _&lt;test-project&gt;_ with your project name.
> - By default the enabled scenes from the project's settings will be built.
## Configuration options
Below options can be specified under `with:` for the `unity-builder` action.
#### projectPath
Specify the path to your Unity project to be built.
The path should be relative to the root of your project.
_**required:** `false`_
_**default:** `<your project root>`_
#### unityVersion
Version of Unity to use for building the project.
_**required:** `false`_
_**default:** `2019.2.1f11`_
#### targetPlatform
Platform that the build should target.
Must be one of the [allowed values](https://docs.unity3d.com/ScriptReference/BuildTarget.html) listed in the Unity scripting manual.
_**required:** `true`_
#### buildName
Name of the build. Also the folder in which the build will be stored within `buildsPath`.
_**required:** `false`_
_**default:** `<build_target>`_
#### buildsPath
Path where the builds should be stored.
In this folder a folder will be created for every targetPlatform.
_**required:** `false`_
_**default:** `build`_
#### buildMethod
Custom command to run your build.
There are two conditions for a custom buildCommand:
- Must reference a valid path to a `static` method.
- The class must reside in the `Assets/Editor` directory.
_**example:**_
```yaml
- uses: webbertakken/unity-builder@master
with:
buildMethod: EditorNamespace.BuilderClassName.StaticBulidMethod
```
_**required:** `false`_
_**default:** Built-in script that will run a build out of the box._
#### customParameters
Custom parameters to configure the build.
Parameters must start with a hyphen (`-`) and may be followed by a value (without hyphen).
Parameters without a value will be considered booleans (with a value of true).
_**example:**_
```yaml
- uses: webbertakken/unity-builder@master
with:
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
```
_**required:** `false`_
_**default:** ""_
## More actions
Visit
[Unity Actions](https://github.com/webbertakken/unity-actions)
to find related actions for Unity.
Feel free to contribute.
You can support us at [OpenCollective](https://opencollective.com/game-ci).
## Licence
[MIT](./LICENSE)
This repository is [MIT](./LICENSE) licensed.
This includes all contributions from the community.

View File

@@ -3,9 +3,13 @@ author: Webber Takken <webber@takken.io>
description: 'Build Unity projects for different platforms.'
inputs:
unityVersion:
required: false
default: 'auto'
description: 'Version of unity to use for building the project. Use "auto" to get from your ProjectSettings/ProjectVersion.txt'
customImage:
required: false
default: ''
description: 'Version of unity to use for building the project.'
description: 'Specific docker image that should be used for building the project'
targetPlatform:
required: false
default: ''
@@ -26,10 +30,107 @@ inputs:
required: false
default: ''
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
outputs: {}
remoteBuildCluster:
default: 'local'
required: false
description: 'Either local, k8s or aws can be used to run builds on a remote cluster. Additional parameters must be configured.'
awsStackName:
default: 'game-ci'
required: false
description: 'The Cloud Formation stack name that must be setup before using this option.'
kubeConfig:
default: ''
required: false
description: 'Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until completion.'
kubeVolume:
default: ''
required: false
description: 'Supply a Persistent Volume Claim name to use for the Unity build.'
remoteBuildMemory:
default: '800M'
required: false
description: 'Amount of memory to assign the remote build container'
remoteBuildCpu:
default: '0.25'
required: false
description: 'Amount of CPU time to assign the remote build container'
kubeVolumeSize:
default: '5Gi'
required: false
description: 'Amount of disc space to assign the Kubernetes Persistent Volume'
githubToken:
default: ''
required: false
description: 'GitHub token for cloning, only needed when kubeconfig is used.'
versioning:
required: false
default: 'Semantic'
description: 'The versioning scheme to use when building the project'
version:
required: false
default: ''
description: 'The version, when used with the "Custom" versioning scheme'
androidVersionCode:
required: false
default: ''
description: 'The android versionCode'
androidAppBundle:
required: false
default: 'false'
description: 'Whether to build .aab instead of .apk'
androidKeystoreName:
required: false
default: ''
description: 'The android keystoreName'
androidKeystoreBase64:
required: false
default: ''
description: 'The base64 contents of the android keystore file'
androidKeystorePass:
required: false
default: ''
description: 'The android keystorePass'
androidKeyaliasName:
required: false
default: ''
description: 'The android keyaliasName'
androidKeyaliasPass:
required: false
default: ''
description: 'The android keyaliasPass'
customParameters:
required: false
default: ''
description: >
Custom parameters to configure the build.
Parameters must start with a hyphen (-) and may be followed by a value (without hyphen).
Parameters without a value will be considered booleans (with a value of true).
sshAgent:
required: false
default: ''
description: 'SSH Agent path to forward to the container'
chownFilesTo:
required: false
default: ''
description: 'User and optionally group (user or user:group or uid:gid) to give ownership of the resulting build artifacts'
allowDirtyBuild:
required: false
default: ''
description: >
Allows the branch of the build to be dirty, and still generate the build.
Note that it is generally bad practice to modify your branch
in a CI Pipeline. However there are exceptions where this might
be needed. (use with care).
outputs:
volume:
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
buildVersion:
description: 'The generated version used for the Unity build'
branding:
icon: 'box'
color: 'gray-dark'
runs:
using: 'node12'
main: 'builder/index.js'
main: 'dist/index.js'

View File

@@ -1,15 +0,0 @@
const esModules = ['lodash-es'].join('|');
module.exports = {
ignore: [`/node_modules/(?!${esModules})`],
presets: [
[
'@babel/preset-env',
{
targets: {
node: true,
},
},
],
],
};

View File

@@ -1,147 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEngine;
namespace UnityBuilderAction
{
static class Builder
{
private static string EOL = Environment.NewLine;
private static void ParseCommandLineArguments(out Dictionary<string, string> providedArguments)
{
providedArguments = new Dictionary<string, string>();
string[] args = Environment.GetCommandLineArgs();
Console.WriteLine(
$"{EOL}" +
$"###########################{EOL}" +
$"# Parsing settings #{EOL}" +
$"###########################{EOL}" +
$"{EOL}"
);
// Extract flags with optional values
for (int current = 0, next = 1; current < args.Length; current++, next++) {
// Parse flag
bool isFlag = args[current].StartsWith("-");
if (!isFlag) continue;
string flag = args[current].TrimStart('-');
// Parse optional value
bool flagHasValue = next < args.Length && !args[next].StartsWith("-");
string value = flagHasValue ? args[next].TrimStart('-') : "";
// Assign
Console.WriteLine($"Found flag \"{flag}\" with value \"{value}\".");
providedArguments.Add(flag, value);
}
}
private static Dictionary<string, string> GetValidatedOptions()
{
ParseCommandLineArguments(out var validatedOptions);
if (!validatedOptions.TryGetValue("projectPath", out var projectPath)) {
Console.WriteLine("Missing argument -projectPath");
EditorApplication.Exit(110);
}
if (!validatedOptions.TryGetValue("buildTarget", out var buildTarget)) {
Console.WriteLine("Missing argument -buildTarget");
EditorApplication.Exit(120);
}
if (!Enum.IsDefined(typeof(BuildTarget), buildTarget)) {
EditorApplication.Exit(121);
}
if (!validatedOptions.TryGetValue("customBuildPath", out var customBuildPath)) {
Console.WriteLine("Missing argument -customBuildPath");
EditorApplication.Exit(130);
}
string defaultCustomBuildName = "TestBuild";
if (!validatedOptions.TryGetValue("customBuildName", out var customBuildName)) {
Console.WriteLine($"Missing argument -customBuildName, defaulting to {defaultCustomBuildName}.");
validatedOptions.Add("customBuildName", defaultCustomBuildName);
}
else if (customBuildName == "") {
Console.WriteLine($"Invalid argument -customBuildName, defaulting to {defaultCustomBuildName}.");
validatedOptions.Add("customBuildName", defaultCustomBuildName);
}
return validatedOptions;
}
public static void BuildProject()
{
// Gather values from args
var options = GetValidatedOptions();
// Gather values from project
var scenes = EditorBuildSettings.scenes.Where(scene => scene.enabled).Select(s => s.path).ToArray();
// Define BuildPlayer Options
var buildOptions = new BuildPlayerOptions {
scenes = scenes,
locationPathName = options["customBuildPath"],
target = (BuildTarget) Enum.Parse(typeof(BuildTarget), options["buildTarget"]),
};
// Perform build
BuildReport buildReport = BuildPipeline.BuildPlayer(buildOptions);
// Summary
BuildSummary summary = buildReport.summary;
ReportSummary(summary);
// Result
BuildResult result = summary.result;
ExitWithResult(result);
}
private static void ReportSummary(BuildSummary summary)
{
Console.WriteLine(
$"{EOL}" +
$"###########################{EOL}" +
$"# Build results #{EOL}" +
$"###########################{EOL}" +
$"{EOL}" +
$"Duration: {summary.totalTime.ToString()}{EOL}" +
$"Warnings: {summary.totalWarnings.ToString()}{EOL}" +
$"Errors: {summary.totalErrors.ToString()}{EOL}" +
$"Size: {summary.totalSize.ToString()} bytes{EOL}" +
$"{EOL}"
);
}
private static void ExitWithResult(BuildResult result)
{
if (result == BuildResult.Succeeded) {
Console.WriteLine("Build succeeded!");
EditorApplication.Exit(0);
}
if (result == BuildResult.Failed) {
Console.WriteLine("Build failed!");
EditorApplication.Exit(101);
}
if (result == BuildResult.Cancelled) {
Console.WriteLine("Build cancelled!");
EditorApplication.Exit(102);
}
if (result == BuildResult.Unknown) {
Console.WriteLine("Build result is unknown!");
EditorApplication.Exit(103);
}
}
}
}

View File

@@ -1,15 +0,0 @@
#!/usr/bin/env bash
#
# Run steps
#
source /steps/activate.sh
source /steps/build.sh
source /steps/return_license.sh
#
# Exit with code from the build step.
#
exit $BUILD_EXIT_CODE

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +0,0 @@
#!/usr/bin/env bash
if [[ -n "$UNITY_SERIAL" ]]; then
#
# PROFESSIONAL (SERIAL) LICENSE MODE
#
# This will return the license that is currently in use.
#
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
/opt/Unity/Editor/Unity \
-batchmode \
-nographics \
-logFile /dev/stdout \
-quit \
-returnlicense
fi

39
codecov.yml Normal file
View File

@@ -0,0 +1,39 @@
codecov:
require_ci_to_pass: yes
coverage:
precision: 2
round: down
range: '70...100'
status:
patch:
default:
# basic
target: auto
threshold: 100% # don't require patch to have coverage per se
base: auto
project:
default:
# basic
target: auto
threshold: 5%
base: auto
flags:
- unit
paths:
- 'src'
parsers:
gcov:
branch_detection:
conditional: yes
loop: yes
method: no
macro: no
comment:
layout: 'reach,diff,flags,tree'
behavior: default
require_changes: no

View File

@@ -15,4 +15,6 @@ ADD steps /steps
RUN chmod -R +x /steps
ADD entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN ls
ENTRYPOINT ["/entrypoint.sh"]

View File

@@ -0,0 +1,69 @@
#!/bin/sh
# This creates a GKE Cluster
# - Will wait for any deletion to complete on a cluster with the same name before creating
# - Will wait for completion before continuing
# - If the script is run concurrently multiple times, only one cluster will be created, all instances will wait for availability
# Requires GCP Cloud SDK
# Installs retry https://github.com/kadwanev/retry
GKE_PROJECT=$1
GKE_CLUSTER=$2
GKE_ZONE=$3
# may update this to avoid repeated install, drop me a comment if needed
sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -o /usr/local/bin/retry && chmod +x /usr/local/bin/retry"
attempts=0
while [ $attempts -le 1 ]
do
retry -s 15 -t 20 -v '
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
jq "
.[] |
{name: .name, status: .status} |
select(.name == \"$GKE_CLUSTER\")
" |
jq ".status")
if [ "$STATUS" == "\"STOPPING\"" ]; then echo "Cluster stopping waiting for completion" && exit 1; fi
exit 0
'
cluster=$(gcloud container clusters list --project $GKE_PROJECT --format="json" | jq '.[] | select(.name == "${GKE_CLUSTER}")')
if [ -z "$cluster" ];
then
echo "No clusters found for \"$GKE_CLUSTER\" in project \"$GKE_CLUSTER\" in zone \"$GKE_ZONE\""
# you may not need this, it installs GCP beta for additional command line options
gcloud components install beta -q
# replace this line with whatever type of cluster you want to create
gcloud beta container --project $GKE_PROJECT clusters create $GKE_CLUSTER --zone $GKE_ZONE --no-enable-basic-auth --cluster-version "1.15.12-gke.2" --machine-type "custom-1-3072" --image-type "COS" --disk-type "pd-standard" --disk-size "15" --metadata disable-legacy-endpoints=true --scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" --num-nodes "1" --enable-stackdriver-kubernetes --enable-ip-alias --default-max-pods-per-node "110" --enable-autoscaling --min-nodes "0" --max-nodes "3" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0
fi;
retry -s 15 -t 20 -v '
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
jq "
.[] |
{name: .name, status: .status} |
select(.name == \"$GKE_CLUSTER\")
" |
jq ".status")
if [ "$STATUS" == "\"PROVISIONING\"" ]; then echo "Cluster provisioning waiting for available" && exit 1; fi
exit 0
'
echo "Cluster is available"
gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
kubectl version
NSID=$(cat /proc/sys/kernel/random/uuid)
echo "::set-env name=NSID::"$NSID
{
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Namespace
metadata:
name: ns-unity-builder-$NSID
labels:
app: unity-builder
EOF
} && exit 0
attempts=$(($attempts+1))
done

View File

@@ -0,0 +1,13 @@
kubectl delete ns ns-unity-builder-$NSID
# do any unity-builder namespaces remain?
namespaceCount=$(kubectl get ns --output json | jq ".items | .[] | select(.metadata.labels.app == \"unity-builder\") | select(.status.phase != \"TERMINATING\")" | jq -s "length")
echo $namespaceCount
if [ "$namespaceCount" != "0" ]
then
echo "let next cluster delete"
exit 0
else
echo "delete cluster"
retry -s 15 -t 5 -v 'gcloud container clusters delete $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT --quiet'
fi

423
dist/cloud-formations/base-setup.yml vendored Normal file
View File

@@ -0,0 +1,423 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: AWS Fargate cluster that can span public and private subnets. Supports
public facing load balancers, private internal load balancers, and
both internal and external service discovery namespaces.
Parameters:
EnvironmentName:
Type: String
Default: development
Description: "Your deployment environment: DEV, QA , PROD"
# ContainerPort:
# Type: Number
# Default: 80
# Description: What port number the application inside the docker container is binding to
Mappings:
# Hard values for the subnet masks. These masks define
# the range of internal IP addresses that can be assigned.
# The VPC can have all IP's from 10.0.0.0 to 10.0.255.255
# There are four subnets which cover the ranges:
#
# 10.0.0.0 - 10.0.0.255
# 10.0.1.0 - 10.0.1.255
# 10.0.2.0 - 10.0.2.255
# 10.0.3.0 - 10.0.3.255
SubnetConfig:
VPC:
CIDR: '10.0.0.0/16'
PublicOne:
CIDR: '10.0.0.0/24'
PublicTwo:
CIDR: '10.0.1.0/24'
Resources:
# VPC in which containers will be networked.
# It has two public subnets, and two private subnets.
# We distribute the subnets across the first two available subnets
# for the region, for high availability.
VPC:
Type: AWS::EC2::VPC
Properties:
EnableDnsSupport: true
EnableDnsHostnames: true
CidrBlock: !FindInMap ['SubnetConfig', 'VPC', 'CIDR']
EFSServerSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: "efs-server-endpoints"
GroupDescription: Which client ip addrs are allowed to access EFS server
VpcId: !Ref 'VPC'
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 2049
ToPort: 2049
SourceSecurityGroupId: !Ref ContainerSecurityGroup
#CidrIp: !FindInMap ['SubnetConfig', 'VPC', 'CIDR']
# A security group for the containers we will run in Fargate.
# Rules are added to this security group based on what ingress you
# add for the cluster.
ContainerSecurityGroup:
Type: AWS::EC2::SecurityGroup
Properties:
GroupName: "task security group"
GroupDescription: Access to the Fargate containers
VpcId: !Ref 'VPC'
# SecurityGroupIngress:
# - IpProtocol: tcp
# FromPort: !Ref ContainerPort
# ToPort: !Ref ContainerPort
# CidrIp: 0.0.0.0/0
SecurityGroupEgress:
- IpProtocol: -1
FromPort: 2049
ToPort: 2049
CidrIp: "0.0.0.0/0"
# Two public subnets, where containers can have public IP addresses
PublicSubnetOne:
Type: AWS::EC2::Subnet
Properties:
AvailabilityZone: !Select
- 0
- Fn::GetAZs: !Ref 'AWS::Region'
VpcId: !Ref 'VPC'
CidrBlock: !FindInMap ['SubnetConfig', 'PublicOne', 'CIDR']
# MapPublicIpOnLaunch: true
PublicSubnetTwo:
Type: AWS::EC2::Subnet
Properties:
AvailabilityZone: !Select
- 1
- Fn::GetAZs: !Ref 'AWS::Region'
VpcId: !Ref 'VPC'
CidrBlock: !FindInMap ['SubnetConfig', 'PublicTwo', 'CIDR']
# MapPublicIpOnLaunch: true
# Setup networking resources for the public subnets. Containers
# in the public subnets have public IP addresses and the routing table
# sends network traffic via the internet gateway.
InternetGateway:
Type: AWS::EC2::InternetGateway
GatewayAttachement:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
VpcId: !Ref 'VPC'
InternetGatewayId: !Ref 'InternetGateway'
# Attaching a Internet Gateway to route table makes it public.
PublicRouteTable:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref 'VPC'
PublicRoute:
Type: AWS::EC2::Route
DependsOn: GatewayAttachement
Properties:
RouteTableId: !Ref 'PublicRouteTable'
DestinationCidrBlock: '0.0.0.0/0'
GatewayId: !Ref 'InternetGateway'
# Attaching a public route table makes a subnet public.
PublicSubnetOneRouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
SubnetId: !Ref PublicSubnetOne
RouteTableId: !Ref PublicRouteTable
PublicSubnetTwoRouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
SubnetId: !Ref PublicSubnetTwo
RouteTableId: !Ref PublicRouteTable
# ECS Resources
ECSCluster:
Type: AWS::ECS::Cluster
# A role used to allow AWS Autoscaling to inspect stats and adjust scaleable targets
# on your AWS account
AutoscalingRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service: [application-autoscaling.amazonaws.com]
Action: ['sts:AssumeRole']
Path: /
Policies:
- PolicyName: service-autoscaling
PolicyDocument:
Statement:
- Effect: Allow
Action:
- 'application-autoscaling:*'
- 'cloudwatch:DescribeAlarms'
- 'cloudwatch:PutMetricAlarm'
- 'ecs:DescribeServices'
- 'ecs:UpdateService'
Resource: '*'
# This is an IAM role which authorizes ECS to manage resources on your
# account on your behalf, such as updating your load balancer with the
# details of where your containers are, so that traffic can reach your
# containers.
ECSRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service: [ecs.amazonaws.com]
Action: ['sts:AssumeRole']
Path: /
Policies:
- PolicyName: ecs-service
PolicyDocument:
Statement:
- Effect: Allow
Action:
# Rules which allow ECS to attach network interfaces to instances
# on your behalf in order for awsvpc networking mode to work right
- 'ec2:AttachNetworkInterface'
- 'ec2:CreateNetworkInterface'
- 'ec2:CreateNetworkInterfacePermission'
- 'ec2:DeleteNetworkInterface'
- 'ec2:DeleteNetworkInterfacePermission'
- 'ec2:Describe*'
- 'ec2:DetachNetworkInterface'
# Rules which allow ECS to update load balancers on your behalf
# with the information sabout how to send traffic to your containers
- 'elasticloadbalancing:DeregisterInstancesFromLoadBalancer'
- 'elasticloadbalancing:DeregisterTargets'
- 'elasticloadbalancing:Describe*'
- 'elasticloadbalancing:RegisterInstancesWithLoadBalancer'
- 'elasticloadbalancing:RegisterTargets'
Resource: '*'
# This is a role which is used by the ECS tasks themselves.
ECSTaskExecutionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service: [ecs-tasks.amazonaws.com]
Action: ['sts:AssumeRole']
Path: /
Policies:
- PolicyName: AmazonECSTaskExecutionRolePolicy
PolicyDocument:
Statement:
- Effect: Allow
Action:
# Allow upload to S3
- 's3:GetObject'
- 's3:GetObjectVersion'
- 's3:PutObject'
# Allow the use of secret manager
- 'secretsmanager:GetSecretValue'
- 'kms:Decrypt'
# Allow the ECS Tasks to download images from ECR
- 'ecr:GetAuthorizationToken'
- 'ecr:BatchCheckLayerAvailability'
- 'ecr:GetDownloadUrlForLayer'
- 'ecr:BatchGetImage'
# Allow the ECS tasks to upload logs to CloudWatch
- 'logs:CreateLogStream'
- 'logs:PutLogEvents'
Resource: '*'
DeleteCFNLambdaExecutionRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Principal:
Service: ["lambda.amazonaws.com"]
Action: "sts:AssumeRole"
Path: "/"
Policies:
- PolicyName: DeleteCFNLambdaExecutionRole
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Action:
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
Resource: "arn:aws:logs:*:*:*"
- Effect: "Allow"
Action:
- "cloudformation:DeleteStack"
- "kinesis:DeleteStream"
- "secretsmanager:DeleteSecret"
- "kinesis:DescribeStreamSummary"
- "logs:DeleteLogGroup"
- "logs:DeleteSubscriptionFilter"
- "ecs:DeregisterTaskDefinition"
- "lambda:DeleteFunction"
- "lambda:InvokeFunction"
- "events:RemoveTargets"
- "events:DeleteRule"
- "lambda:RemovePermission"
Resource: "*"
### cloud watch to kinesis role
CloudWatchIAMRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Statement:
- Effect: Allow
Principal:
Service: [logs.amazonaws.com]
Action: ['sts:AssumeRole']
Path: /
Policies:
- PolicyName: service-autoscaling
PolicyDocument:
Statement:
- Effect: Allow
Action:
- 'kinesis:PutRecord'
Resource: '*'
#####################EFS#####################
EfsFileStorage:
Type: 'AWS::EFS::FileSystem'
Properties:
BackupPolicy:
Status: ENABLED
PerformanceMode: maxIO
Encrypted: false
FileSystemPolicy:
Version: "2012-10-17"
Statement:
- Effect: "Allow"
Action:
- "elasticfilesystem:ClientMount"
- "elasticfilesystem:ClientWrite"
- "elasticfilesystem:ClientRootAccess"
Principal:
AWS: "*"
MountTargetResource1:
Type: AWS::EFS::MountTarget
Properties:
FileSystemId: !Ref EfsFileStorage
SubnetId: !Ref PublicSubnetOne
SecurityGroups:
- !Ref EFSServerSecurityGroup
MountTargetResource2:
Type: AWS::EFS::MountTarget
Properties:
FileSystemId: !Ref EfsFileStorage
SubnetId: !Ref PublicSubnetTwo
SecurityGroups:
- !Ref EFSServerSecurityGroup
S3Bucket:
Type: 'AWS::S3::Bucket'
DeletionPolicy: Retain
Properties:
BucketName: game-ci-storage
Outputs:
EfsFileStorageId:
Description: 'The connection endpoint for the database.'
Value: !Ref EfsFileStorage
Export:
Name: !Sub ${EnvironmentName}:EfsFileStorageId
ClusterName:
Description: The name of the ECS cluster
Value: !Ref 'ECSCluster'
Export:
Name: !Sub ${EnvironmentName}:ClusterName
AutoscalingRole:
Description: The ARN of the role used for autoscaling
Value: !GetAtt 'AutoscalingRole.Arn'
Export:
Name: !Sub ${EnvironmentName}:AutoscalingRole
ECSRole:
Description: The ARN of the ECS role
Value: !GetAtt 'ECSRole.Arn'
Export:
Name: !Sub ${EnvironmentName}:ECSRole
ECSTaskExecutionRole:
Description: The ARN of the ECS role tsk execution role
Value: !GetAtt 'ECSTaskExecutionRole.Arn'
Export:
Name: !Sub ${EnvironmentName}:ECSTaskExecutionRole
DeleteCFNLambdaExecutionRole:
Description: Lambda execution role for cleaning up cloud formations
Value: !GetAtt 'DeleteCFNLambdaExecutionRole.Arn'
Export:
Name: !Sub ${EnvironmentName}:DeleteCFNLambdaExecutionRole
CloudWatchIAMRole:
Description: The ARN of the CloudWatch role for subscription filter
Value: !GetAtt 'CloudWatchIAMRole.Arn'
Export:
Name: !Sub ${EnvironmentName}:CloudWatchIAMRole
VpcId:
Description: The ID of the VPC that this stack is deployed in
Value: !Ref 'VPC'
Export:
Name: !Sub ${EnvironmentName}:VpcId
PublicSubnetOne:
Description: Public subnet one
Value: !Ref 'PublicSubnetOne'
Export:
Name: !Sub ${EnvironmentName}:PublicSubnetOne
PublicSubnetTwo:
Description: Public subnet two
Value: !Ref 'PublicSubnetTwo'
Export:
Name: !Sub ${EnvironmentName}:PublicSubnetTwo
ContainerSecurityGroup:
Description: A security group used to allow Fargate containers to receive traffic
Value: !Ref 'ContainerSecurityGroup'
Export:
Name: !Sub ${EnvironmentName}:ContainerSecurityGroup

View File

@@ -0,0 +1,143 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: Schedule automatic deletion of CloudFormation stacks
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Input configuration
Parameters:
- StackName
- TTL
ParameterLabels:
StackName:
default: Stack name
TTL:
default: Time-to-live
Parameters:
EnvironmentName:
Type: String
Default: development
Description: 'Your deployment environment: DEV, QA , PROD'
BUILDID:
Type: String
Default: ''
StackName:
Type: String
Description: Stack name that will be deleted.
DeleteStackName:
Type: String
Description: Stack name that will be deleted.
TTL:
Type: Number
Description: Time-to-live in minutes for the stack.
Resources:
DeleteCFNLambda:
Type: "AWS::Lambda::Function"
Properties:
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
Code:
ZipFile: |
import boto3
import os
import json
stack_name = os.environ['stackName']
delete_stack_name = os.environ['deleteStackName']
def delete_cfn(stack_name):
try:
cfn = boto3.resource('cloudformation')
stack = cfn.Stack(stack_name)
stack.delete()
return "SUCCESS"
except:
return "ERROR"
def handler(event, context):
print("Received event:")
print(json.dumps(event))
result = delete_cfn(stack_name)
delete_cfn(delete_stack_name)
return result
Environment:
Variables:
stackName: !Ref 'StackName'
deleteStackName: !Ref 'DeleteStackName'
Handler: "index.handler"
Runtime: "python3.6"
Timeout: "5"
Role:
'Fn::ImportValue': !Sub '${EnvironmentName}:DeleteCFNLambdaExecutionRole'
DeleteStackEventRule:
DependsOn:
- DeleteCFNLambda
- GenerateCronExpression
Type: "AWS::Events::Rule"
Properties:
Name: !Join [ "", [ 'DeleteStackEventRule', !Ref BUILDID ] ]
Description: Delete stack event
ScheduleExpression: !GetAtt GenerateCronExpression.cron_exp
State: "ENABLED"
Targets:
-
Arn: !GetAtt DeleteCFNLambda.Arn
Id: 'DeleteCFNLambda'
PermissionForDeleteCFNLambda:
Type: "AWS::Lambda::Permission"
DependsOn:
- DeleteStackEventRule
Properties:
FunctionName: !Join [ "", [ 'DeleteCFNLambda', !Ref BUILDID ] ]
Action: "lambda:InvokeFunction"
Principal: "events.amazonaws.com"
SourceArn: !GetAtt DeleteStackEventRule.Arn
GenerateCronExpLambda:
Type: "AWS::Lambda::Function"
Properties:
FunctionName: !Join [ "", [ 'GenerateCronExpressionLambda', !Ref BUILDID ] ]
Code:
ZipFile: |
from datetime import datetime, timedelta
import os
import logging
import json
import cfnresponse
def deletion_time(ttl):
delete_at_time = datetime.now() + timedelta(minutes=int(ttl))
hh = delete_at_time.hour
mm = delete_at_time.minute
yyyy = delete_at_time.year
month = delete_at_time.month
dd = delete_at_time.day
# minutes hours day month day-of-week year
cron_exp = "cron({} {} {} {} ? {})".format(mm, hh, dd, month, yyyy)
return cron_exp
def handler(event, context):
print('Received event: %s' % json.dumps(event))
status = cfnresponse.SUCCESS
try:
if event['RequestType'] == 'Delete':
cfnresponse.send(event, context, status, {})
else:
ttl = event['ResourceProperties']['ttl']
responseData = {}
responseData['cron_exp'] = deletion_time(ttl)
cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData)
except Exception as e:
logging.error('Exception: %s' % e, exc_info=True)
status = cfnresponse.FAILED
cfnresponse.send(event, context, status, {}, None)
Handler: "index.handler"
Runtime: "python3.6"
Timeout: "5"
Role:
'Fn::ImportValue': !Sub '${EnvironmentName}:DeleteCFNLambdaExecutionRole'
GenerateCronExpression:
Type: "Custom::GenerateCronExpression"
Version: "1.0"
Properties:
Name: !Join [ "", [ 'GenerateCronExpression', !Ref BUILDID ] ]
ServiceToken: !GetAtt GenerateCronExpLambda.Arn
ttl: !Ref 'TTL'

View File

@@ -0,0 +1,221 @@
AWSTemplateFormatVersion: 2010-09-09
Description: >-
AWS Fargate cluster that can span public and private subnets. Supports public
facing load balancers, private internal load balancers, and both internal and
external service discovery namespaces.
Parameters:
EnvironmentName:
Type: String
Default: development
Description: 'Your deployment environment: DEV, QA , PROD'
ServiceName:
Type: String
Default: example
Description: A name for the service
ImageUrl:
Type: String
Default: nginx
Description: >-
The url of a docker image that contains the application process that will
handle the traffic for this service
ContainerPort:
Type: Number
Default: 80
Description: What port number the application inside the docker container is binding to
ContainerCpu:
Type: Number
Default: 1024
Description: How much CPU to give the container. 1024 is 1 CPU
ContainerMemory:
Type: Number
Default: 2048
Description: How much memory in megabytes to give the container
BUILDID:
Type: String
Default: ''
Command:
Type: String
Default: 'ls'
EntryPoint:
Type: String
Default: '/bin/sh'
WorkingDirectory:
Type: String
Default: '/efsdata/'
Role:
Type: String
Default: ''
Description: >-
(Optional) An IAM role to give the service's containers if the code within
needs to access other AWS resources like S3 buckets, DynamoDB tables, etc
EFSMountDirectory:
Type: String
Default: '/efsdata'
# template secrets p1 - input
Mappings:
SubnetConfig:
VPC:
CIDR: 10.0.0.0/16
PublicOne:
CIDR: 10.0.0.0/24
PublicTwo:
CIDR: 10.0.1.0/24
Conditions:
HasCustomRole: !Not
- !Equals
- Ref: Role
- ''
Resources:
LogGroup:
Type: 'AWS::Logs::LogGroup'
Properties:
LogGroupName: !Ref ServiceName
Metadata:
'AWS::CloudFormation::Designer':
id: aece53ae-b82d-4267-bc16-ed964b05db27
SubscriptionFilter:
Type: 'AWS::Logs::SubscriptionFilter'
Properties:
FilterPattern: ''
RoleArn:
'Fn::ImportValue': !Sub '${EnvironmentName}:CloudWatchIAMRole'
LogGroupName: !Ref ServiceName
DestinationArn:
'Fn::GetAtt':
- KinesisStream
- Arn
Metadata:
'AWS::CloudFormation::Designer':
id: 7f809e91-9e5d-4678-98c1-c5085956c480
DependsOn:
- LogGroup
- KinesisStream
KinesisStream:
Type: 'AWS::Kinesis::Stream'
Properties:
Name: !Ref ServiceName
ShardCount: 1
Metadata:
'AWS::CloudFormation::Designer':
id: c6f18447-b879-4696-8873-f981b2cedd2b
# template secrets p2 - secret
TaskDefinition:
Type: 'AWS::ECS::TaskDefinition'
Properties:
Family: !Ref ServiceName
Cpu: !Ref ContainerCpu
Memory: !Ref ContainerMemory
NetworkMode: awsvpc
Volumes:
- Name: efs-data
EFSVolumeConfiguration:
FilesystemId:
'Fn::ImportValue': !Sub '${EnvironmentName}:EfsFileStorageId'
TransitEncryption: ENABLED
RequiresCompatibilities:
- FARGATE
ExecutionRoleArn:
'Fn::ImportValue': !Sub '${EnvironmentName}:ECSTaskExecutionRole'
TaskRoleArn:
'Fn::If':
- HasCustomRole
- !Ref Role
- !Ref 'AWS::NoValue'
ContainerDefinitions:
- Name: !Ref ServiceName
Cpu: !Ref ContainerCpu
Memory: !Ref ContainerMemory
Image: !Ref ImageUrl
EntryPoint:
Fn::Split:
- ","
- !Ref EntryPoint
Command:
Fn::Split:
- ","
- !Ref Command
WorkingDirectory: !Ref WorkingDirectory
Environment:
- Name: ALLOW_EMPTY_PASSWORD
Value: 'yes'
# template - env vars
MountPoints:
- SourceVolume: efs-data
ContainerPath: !Ref EFSMountDirectory
ReadOnly: false
Secrets:
# template secrets p3 - container def
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: !Ref ServiceName
awslogs-region: !Ref 'AWS::Region'
awslogs-stream-prefix: !Ref ServiceName
Metadata:
'AWS::CloudFormation::Designer':
id: dabb0116-abe0-48a6-a8af-cf9111c879a5
DependsOn:
- LogGroup
Metadata:
'AWS::CloudFormation::Designer':
dabb0116-abe0-48a6-a8af-cf9111c879a5:
size:
width: 60
height: 60
position:
x: 270
'y': 90
z: 1
embeds: []
dependson:
- aece53ae-b82d-4267-bc16-ed964b05db27
c6f18447-b879-4696-8873-f981b2cedd2b:
size:
width: 60
height: 60
position:
x: 270
'y': 210
z: 1
embeds: []
7f809e91-9e5d-4678-98c1-c5085956c480:
size:
width: 60
height: 60
position:
x: 60
'y': 300
z: 1
embeds: []
dependson:
- aece53ae-b82d-4267-bc16-ed964b05db27
- c6f18447-b879-4696-8873-f981b2cedd2b
aece53ae-b82d-4267-bc16-ed964b05db27:
size:
width: 150
height: 150
position:
x: 60
'y': 90
z: 1
embeds: []
4d2da56c-3643-46b8-aaee-e46e19f95fcc:
source:
id: 7f809e91-9e5d-4678-98c1-c5085956c480
target:
id: aece53ae-b82d-4267-bc16-ed964b05db27
z: 11
14eb957b-f094-4653-93c4-77b2f851953c:
source:
id: 7f809e91-9e5d-4678-98c1-c5085956c480
target:
id: c6f18447-b879-4696-8873-f981b2cedd2b
z: 12
85c57444-e5bb-4230-bc85-e545cd4558f6:
source:
id: dabb0116-abe0-48a6-a8af-cf9111c879a5
target:
id: aece53ae-b82d-4267-bc16-ed964b05db27
z: 13

View File

@@ -0,0 +1,4 @@
root = true
[*.cs]
resharper_check_namespace_highlighting = do_not_show

View File

@@ -57,6 +57,13 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Editor\Builder.cs" />
<Compile Include="Assets\Editor\Input\ArgumentsParser.cs" />
<Compile Include="Assets\Editor\Reporting\StdOutReporter.cs" />
<Compile Include="Assets\Editor\System\ProcessExtensions.cs" />
<Compile Include="Assets\Editor\Versioning\VersionApplicator.cs" />
<Compile Include="Assets\Editor\Versioning\Git.cs" />
<Compile Include="Assets\Editor\Versioning\VersionGenerator.cs" />
<Compile Include="Assets\Editor\Versioning\GitException.cs" />
<Reference Include="UnityEditor.TestRunner">
<HintPath>C:/Repositories/unity-builder/builder/default-build-script/Library/ScriptAssemblies/UnityEditor.TestRunner.dll</HintPath>
</Reference>
@@ -688,6 +695,9 @@
<HintPath>C:/Program Files/Unity/2019.2.11f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Content Include=".editorconfig" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e9babefb99ee74048a824da81c20cbcd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,80 @@
using System;
using System.Linq;
using System.Reflection;
using UnityBuilderAction.Input;
using UnityBuilderAction.Reporting;
using UnityBuilderAction.Versioning;
using UnityEditor;
using UnityEditor.Build.Reporting;
using UnityEngine;
namespace UnityBuilderAction
{
static class Builder
{
public static void BuildProject()
{
// Gather values from args
var options = ArgumentsParser.GetValidatedOptions();
// Gather values from project
var scenes = EditorBuildSettings.scenes.Where(scene => scene.enabled).Select(s => s.path).ToArray();
// Get all buildOptions from options
BuildOptions buildOptions = BuildOptions.None;
foreach (string buildOptionString in Enum.GetNames(typeof(BuildOptions))) {
if (options.ContainsKey(buildOptionString)) {
BuildOptions buildOptionEnum = (BuildOptions) Enum.Parse(typeof(BuildOptions), buildOptionString);
buildOptions |= buildOptionEnum;
}
}
// Define BuildPlayer Options
var buildPlayerOptions = new BuildPlayerOptions {
scenes = scenes,
locationPathName = options["customBuildPath"],
target = (BuildTarget) Enum.Parse(typeof(BuildTarget), options["buildTarget"]),
options = buildOptions
};
// Set version for this build
VersionApplicator.SetVersion(options["buildVersion"]);
VersionApplicator.SetAndroidVersionCode(options["androidVersionCode"]);
// Apply Android settings
if (buildPlayerOptions.target == BuildTarget.Android)
AndroidSettings.Apply(options);
// Execute default AddressableAsset content build, if the package is installed.
// Version defines would be the best solution here, but Unity 2018 doesn't support that,
// so we fall back to using reflection instead.
var addressableAssetSettingsType = Type.GetType(
"UnityEditor.AddressableAssets.Settings.AddressableAssetSettings,Unity.Addressables.Editor");
if (addressableAssetSettingsType != null)
{
// ReSharper disable once PossibleNullReferenceException, used from try-catch
try
{
addressableAssetSettingsType.GetMethod("CleanPlayerContent", BindingFlags.Static | BindingFlags.Public)
.Invoke(null, new object[] {null});
addressableAssetSettingsType.GetMethod("BuildPlayerContent", new Type[0]).Invoke(null, new object[0]);
}
catch (Exception e)
{
Debug.LogError($"Failed to run default addressables build:\n{e}");
}
}
// Perform build
BuildReport buildReport = BuildPipeline.BuildPlayer(buildPlayerOptions);
// Summary
BuildSummary summary = buildReport.summary;
StdOutReporter.ReportSummary(summary);
// Result
BuildResult result = summary.result;
StdOutReporter.ExitWithResult(result);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b6e5ef18d769419d887b56665969442b
timeCreated: 1587503329

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
using UnityEditor;
namespace UnityBuilderAction.Input
{
public class AndroidSettings
{
public static void Apply(Dictionary<string, string> options)
{
EditorUserBuildSettings.buildAppBundle = options["customBuildPath"].EndsWith(".aab");
if (options.TryGetValue("androidKeystoreName", out string keystoreName) && !string.IsNullOrEmpty(keystoreName))
PlayerSettings.Android.keystoreName = keystoreName;
if (options.TryGetValue("androidKeystorePass", out string keystorePass) && !string.IsNullOrEmpty(keystorePass))
PlayerSettings.Android.keystorePass = keystorePass;
if (options.TryGetValue("androidKeyaliasName", out string keyaliasName) && !string.IsNullOrEmpty(keyaliasName))
PlayerSettings.Android.keyaliasName = keyaliasName;
if (options.TryGetValue("androidKeyaliasPass", out string keyaliasPass) && !string.IsNullOrEmpty(keyaliasPass))
PlayerSettings.Android.keyaliasPass = keyaliasPass;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 0d51cf8acfff8c941bb753e82750b60a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
namespace UnityBuilderAction.Input
{
public class ArgumentsParser
{
static string EOL = Environment.NewLine;
static readonly string[] Secrets = { "androidKeystorePass", "androidKeyaliasName", "androidKeyaliasPass" };
public static Dictionary<string, string> GetValidatedOptions()
{
ParseCommandLineArguments(out var validatedOptions);
if (!validatedOptions.TryGetValue("projectPath", out var projectPath)) {
Console.WriteLine("Missing argument -projectPath");
EditorApplication.Exit(110);
}
if (!validatedOptions.TryGetValue("buildTarget", out var buildTarget)) {
Console.WriteLine("Missing argument -buildTarget");
EditorApplication.Exit(120);
}
if (!Enum.IsDefined(typeof(BuildTarget), buildTarget)) {
EditorApplication.Exit(121);
}
if (!validatedOptions.TryGetValue("customBuildPath", out var customBuildPath)) {
Console.WriteLine("Missing argument -customBuildPath");
EditorApplication.Exit(130);
}
const string defaultCustomBuildName = "TestBuild";
if (!validatedOptions.TryGetValue("customBuildName", out var customBuildName)) {
Console.WriteLine($"Missing argument -customBuildName, defaulting to {defaultCustomBuildName}.");
validatedOptions.Add("customBuildName", defaultCustomBuildName);
} else if (customBuildName == "") {
Console.WriteLine($"Invalid argument -customBuildName, defaulting to {defaultCustomBuildName}.");
validatedOptions.Add("customBuildName", defaultCustomBuildName);
}
return validatedOptions;
}
static void ParseCommandLineArguments(out Dictionary<string, string> providedArguments)
{
providedArguments = new Dictionary<string, string>();
string[] args = Environment.GetCommandLineArgs();
Console.WriteLine(
$"{EOL}" +
$"###########################{EOL}" +
$"# Parsing settings #{EOL}" +
$"###########################{EOL}" +
$"{EOL}"
);
// Extract flags with optional values
for (int current = 0, next = 1; current < args.Length; current++, next++) {
// Parse flag
bool isFlag = args[current].StartsWith("-");
if (!isFlag) continue;
string flag = args[current].TrimStart('-');
// Parse optional value
bool flagHasValue = next < args.Length && !args[next].StartsWith("-");
string value = flagHasValue ? args[next].TrimStart('-') : "";
bool secret = Secrets.Contains(flag);
string displayValue = secret ? "*HIDDEN*" : "\"" + value + "\"";
// Assign
Console.WriteLine($"Found flag \"{flag}\" with value {displayValue}.");
providedArguments.Add(flag, value);
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 46d2ec4a86604575be2b2d02b0df7b74
timeCreated: 1587503354

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 166f919334c44e7a80ae916667974e7d
timeCreated: 1587503566

View File

@@ -0,0 +1,50 @@
using System;
using UnityEditor;
using UnityEditor.Build.Reporting;
namespace UnityBuilderAction.Reporting
{
public class StdOutReporter
{
static string EOL = Environment.NewLine;
public static void ReportSummary(BuildSummary summary)
{
Console.WriteLine(
$"{EOL}" +
$"###########################{EOL}" +
$"# Build results #{EOL}" +
$"###########################{EOL}" +
$"{EOL}" +
$"Duration: {summary.totalTime.ToString()}{EOL}" +
$"Warnings: {summary.totalWarnings.ToString()}{EOL}" +
$"Errors: {summary.totalErrors.ToString()}{EOL}" +
$"Size: {summary.totalSize.ToString()} bytes{EOL}" +
$"{EOL}"
);
}
public static void ExitWithResult(BuildResult result)
{
if (result == BuildResult.Succeeded) {
Console.WriteLine("Build succeeded!");
EditorApplication.Exit(0);
}
if (result == BuildResult.Failed) {
Console.WriteLine("Build failed!");
EditorApplication.Exit(101);
}
if (result == BuildResult.Cancelled) {
Console.WriteLine("Build cancelled!");
EditorApplication.Exit(102);
}
if (result == BuildResult.Unknown) {
Console.WriteLine("Build result is unknown!");
EditorApplication.Exit(103);
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e59b491a4124442ea7277f76761cdc8a
timeCreated: 1587503545

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b5da3bd7e18c43d79243410166c8dc9a
timeCreated: 1587493708

View File

@@ -0,0 +1,42 @@
using System.Diagnostics;
using System.Text;
public static class ProcessExtensions
{
// Execute an application or binary with given arguments
//
// See: https://stackoverflow.com/questions/4291912/process-start-how-to-get-the-output
public static int Run(this Process process, string application,
string arguments, string workingDirectory, out string output,
out string errors)
{
// Configure how to run the application
process.StartInfo = new ProcessStartInfo {
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
FileName = application,
Arguments = arguments,
WorkingDirectory = workingDirectory
};
// Read the output
var outputBuilder = new StringBuilder();
var errorsBuilder = new StringBuilder();
process.OutputDataReceived += (_, args) => outputBuilder.AppendLine(args.Data);
process.ErrorDataReceived += (_, args) => errorsBuilder.AppendLine(args.Data);
// Run the application and wait for it to complete
process.Start();
process.BeginOutputReadLine();
process.BeginErrorReadLine();
process.WaitForExit();
// Format the output
output = outputBuilder.ToString().TrimEnd();
errors = errorsBuilder.ToString().TrimEnd();
return process.ExitCode;
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 29c1880a390c4af7be821b7877602815
timeCreated: 1587494270

View File

@@ -0,0 +1,15 @@
{
"name": "UnityBuilderAction",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a1ab437d31f4f4c9084097e2b4b5fcae
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1c3bddf6d8984cde9208e3f0fe584879
timeCreated: 1587490700

View File

@@ -0,0 +1,116 @@
using System;
using UnityEngine;
namespace UnityBuilderAction.Versioning
{
public static class Git
{
const string application = @"git";
/// <summary>
/// Generate a version based on the latest tag and the amount of commits.
/// Format: 0.1.2 (where 2 is the amount of commits).
///
/// If no tag is present in the repository then v0.0 is assumed.
/// This would result in 0.0.# where # is the amount of commits.
/// </summary>
public static string GenerateSemanticCommitVersion()
{
string version;
if (HasAnyVersionTags()) {
version = GetSemanticCommitVersion();
Console.WriteLine("Repository has a valid version tag.");
} else {
version = $"0.0.{GetTotalNumberOfCommits()}";
Console.WriteLine("Repository does not have tags to base the version on.");
}
Console.WriteLine($"Version is {version}");
return version;
}
/// <summary>
/// Get the version of the current tag.
///
/// The tag must point at HEAD for this method to work.
///
/// Output Format:
/// #.* (where # is the major version and * can be any number of any type of character)
/// </summary>
public static string GetTagVersion()
{
string version = Run(@"tag --points-at HEAD | grep v[0-9]*");
version = version.Substring(1);
return version;
}
/// <summary>
/// Get the total number of commits.
/// </summary>
static int GetTotalNumberOfCommits()
{
string numberOfCommitsAsString = Run(@"git rev-list --count HEAD");
return int.Parse(numberOfCommitsAsString);
}
/// <summary>
/// Whether or not the repository has any version tags yet.
/// </summary>
static bool HasAnyVersionTags()
{
return "0" != Run(@"tag --list --merged HEAD | grep v[0-9]* | wc -l");
}
/// <summary>
/// Retrieves the build version from git based on the most recent matching tag and
/// commit history. This returns the version as: {major.minor.build} where 'build'
/// represents the nth commit after the tagged commit.
/// Note: The initial 'v' and the commit hash are removed.
/// </summary>
static string GetSemanticCommitVersion()
{
// v0.1-2-g12345678 (where 2 is the amount of commits, g stands for git)
string version = GetVersionString();
// 0.1-2
version = version.Substring(1, version.LastIndexOf('-') - 1);
// 0.1.2
version = version.Replace('-', '.');
return version;
}
/// <summary>
/// Get version string.
///
/// Format: `v0.1-2-g12345678` (where 2 is the amount of commits since the last tag)
///
/// See: https://softwareengineering.stackexchange.com/questions/141973/how-do-you-achieve-a-numeric-versioning-scheme-with-git
/// </summary>
static string GetVersionString()
{
return Run(@"describe --tags --long --match ""v[0-9]*""");
// Todo - implement split function based on this more complete query
// return Run(@"describe --long --tags --dirty --always");
}
/// <summary>
/// Runs git binary with any given arguments and returns the output.
/// </summary>
static string Run(string arguments)
{
using (var process = new System.Diagnostics.Process()) {
string workingDirectory = UnityEngine.Application.dataPath;
int exitCode = process.Run(application, arguments, workingDirectory, out string output, out string errors);
if (exitCode != 0) { throw new GitException(exitCode, errors); }
return output;
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cdec7fa0f5bb44958fdf74d4658a4601
timeCreated: 1587495075

View File

@@ -0,0 +1,14 @@
using System;
namespace UnityBuilderAction.Versioning
{
public class GitException : InvalidOperationException
{
public readonly int code;
public GitException(int code, string errors) : base(errors)
{
this.code = code;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4d375e209fd14fc5bc2f3dc3c78ac574
timeCreated: 1587490750

View File

@@ -0,0 +1,27 @@
using System;
using UnityEditor;
namespace UnityBuilderAction.Versioning
{
public class VersionApplicator
{
public static void SetVersion(string version)
{
if (version == "none") {
return;
}
Apply(version);
}
public static void SetAndroidVersionCode(string androidVersionCode) {
PlayerSettings.Android.bundleVersionCode = Int32.Parse(androidVersionCode);
}
static void Apply(string version)
{
PlayerSettings.bundleVersion = version;
PlayerSettings.macOS.buildNumber = version;
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 30483367ddc84699a0da377ccb93769a
timeCreated: 1587504315

View File

@@ -0,0 +1,10 @@
namespace UnityBuilderAction.Versioning
{
public static class VersionGenerator
{
public static string Generate()
{
return Git.GenerateSemanticCommitVersion();
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9892e03ae8314b7eacd793c8002de007
timeCreated: 1587490842

View File

@@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=Untracked/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Versioning/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

45
dist/entrypoint.sh vendored Executable file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/env bash
#
# Create directory for license activation
#
ACTIVATE_LICENSE_PATH="$GITHUB_WORKSPACE/_activate-license"
mkdir -p "$ACTIVATE_LICENSE_PATH"
#
# Run steps
#
source /steps/activate.sh
source /steps/build.sh
source /steps/return_license.sh
#
# Remove license activation directory
#
rm -r "$ACTIVATE_LICENSE_PATH"
#
# Instructions for debugging
#
if [[ $BUILD_EXIT_CODE -gt 0 ]]; then
echo ""
echo "###########################"
echo "# Failure #"
echo "###########################"
echo ""
echo "Please note that the exit code is not very descriptive."
echo "Most likely it will not help you solve the issue."
echo ""
echo "To find the reason for failure: please search for errors in the log above."
echo ""
fi;
#
# Exit with code from the build step.
#
exit $BUILD_EXIT_CODE

39
dist/exec-child.js vendored Normal file
View File

@@ -0,0 +1,39 @@
if (require.main !== module) {
throw new Error('This file should not be required');
}
var childProcess = require('child_process');
var fs = require('fs');
var paramFilePath = process.argv[2];
var serializedParams = fs.readFileSync(paramFilePath, 'utf8');
var params = JSON.parse(serializedParams);
var cmd = params.command;
var execOptions = params.execOptions;
var pipe = params.pipe;
var stdoutFile = params.stdoutFile;
var stderrFile = params.stderrFile;
var c = childProcess.exec(cmd, execOptions, function (err) {
if (!err) {
process.exitCode = 0;
} else if (err.code === undefined) {
process.exitCode = 1;
} else {
process.exitCode = err.code;
}
});
var stdoutStream = fs.createWriteStream(stdoutFile);
var stderrStream = fs.createWriteStream(stderrFile);
c.stdout.pipe(stdoutStream);
c.stderr.pipe(stderrStream);
c.stdout.pipe(process.stdout);
c.stderr.pipe(process.stderr);
if (pipe) {
c.stdin.end(pipe);
}

204227
dist/index.js generated vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

3277
dist/licenses.txt generated vendored Normal file

File diff suppressed because it is too large Load Diff

3910
dist/sourcemap-register.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

38
builder/steps/activate.sh → dist/steps/activate.sh vendored Normal file → Executable file
View File

@@ -1,6 +1,10 @@
#!/usr/bin/env bash
if [[ -n "$UNITY_LICENSE" ]]; then
# Run in ACTIVATE_LICENSE_PATH directory
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
pushd "$ACTIVATE_LICENSE_PATH"
if [[ -n "$UNITY_LICENSE" ]] || [[ -n "$UNITY_LICENSE_FILE" ]]; then
#
# PERSONAL LICENSE MODE
#
@@ -15,14 +19,16 @@ if [[ -n "$UNITY_LICENSE" ]]; then
# Set the license file path
FILE_PATH=UnityLicenseFile.ulf
# Copy license file from Github variables
echo "$UNITY_LICENSE" | tr -d '\r' > $FILE_PATH
if [[ -n "$UNITY_LICENSE" ]]; then
# Copy license file from Github variables
echo "$UNITY_LICENSE" | tr -d '\r' > $FILE_PATH
elif [[ -n "$UNITY_LICENSE_FILE" ]]; then
# Copy license file from file system
cat "$UNITY_LICENSE_FILE" | tr -d '\r' > $FILE_PATH
fi
# Activate license
ACTIVATION_OUTPUT=$(xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
/opt/Unity/Editor/Unity \
-batchmode \
-nographics \
ACTIVATION_OUTPUT=$(unity-editor \
-logFile /dev/stdout \
-quit \
-manualLicenseFile $FILE_PATH)
@@ -58,15 +64,12 @@ elif [[ -n "$UNITY_SERIAL" && -n "$UNITY_EMAIL" && -n "$UNITY_PASSWORD" ]]; then
echo "Requesting activation (professional license)"
# Activate license
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
/opt/Unity/Editor/Unity \
-batchmode \
-nographics \
-logFile /dev/stdout \
-quit \
-serial "$UNITY_SERIAL" \
-username "$UNITY_EMAIL" \
-password "$UNITY_PASSWORD"
unity-editor \
-logFile /dev/stdout \
-quit \
-serial "$UNITY_SERIAL" \
-username "$UNITY_EMAIL" \
-password "$UNITY_PASSWORD"
# Store the exit code from the verify command
UNITY_EXIT_CODE=$?
@@ -99,3 +102,6 @@ else
echo "Exit code was: $UNITY_EXIT_CODE"
exit $UNITY_EXIT_CODE
fi
# Return to previous working directory
popd

83
builder/steps/build.sh → dist/steps/build.sh vendored Normal file → Executable file
View File

@@ -48,7 +48,7 @@ if [ -z "$BUILD_METHOD" ]; then
# Create Editor directory if it does not exist
mkdir -p "$UNITY_PROJECT_PATH/Assets/Editor/"
# Copy the build script of Unity Builder action
cp -r "/UnityBuilderAction/Assets/Editor" "$UNITY_PROJECT_PATH/Assets/Editor/"
cp -R "/UnityBuilderAction/Assets/Editor/" "$UNITY_PROJECT_PATH/Assets/Editor/"
# Set the Build method to that of UnityBuilder Action
BUILD_METHOD="UnityBuilderAction.Builder.BuildProject"
# Verify recursive paths
@@ -63,17 +63,28 @@ else
fi
#
# Display custom parameters
# Create Android keystore, if needed
#
echo "Using custom parameters \"$CUSTOM_PARAMETERS\"."
# The build specification below may require Unity 2019.2.11f1 or later (not tested below).
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
if [[ -z $ANDROID_KEYSTORE_NAME || -z $ANDROID_KEYSTORE_BASE64 ]]; then
echo "Not creating Android keystore."
else
echo "$ANDROID_KEYSTORE_BASE64" | base64 --decode > "$UNITY_PROJECT_PATH/$ANDROID_KEYSTORE_NAME"
echo "Created Android keystore."
fi
#
# Build info
# Pre-build debug information
#
echo ""
echo "###########################"
echo "# Custom parameters #"
echo "###########################"
echo ""
echo "$CUSTOM_PARAMETERS"
echo ""
echo "###########################"
echo "# Current build dir #"
@@ -90,26 +101,36 @@ echo "# Project directory #"
echo "###########################"
echo ""
ls -alh $UNITY_PROJECT_PATH
ls -alh "$UNITY_PROJECT_PATH"
#
# Build
#
echo ""
echo "###########################"
echo "# Building platform #"
echo "# Building project #"
echo "###########################"
echo ""
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24' \
/opt/Unity/Editor/Unity \
-batchmode \
-logfile /dev/stdout \
-quit \
-customBuildName "$BUILD_NAME" \
-projectPath "$UNITY_PROJECT_PATH" \
-buildTarget "$BUILD_TARGET" \
-customBuildTarget "$BUILD_TARGET" \
-customBuildPath "$CUSTOM_BUILD_PATH" \
-executeMethod "$BUILD_METHOD" \
"$CUSTOM_PARAMETERS"
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
unity-editor \
-logfile /dev/stdout \
-quit \
-customBuildName "$BUILD_NAME" \
-projectPath "$UNITY_PROJECT_PATH" \
-buildTarget "$BUILD_TARGET" \
-customBuildTarget "$BUILD_TARGET" \
-customBuildPath "$CUSTOM_BUILD_PATH" \
-executeMethod "$BUILD_METHOD" \
-buildVersion "$VERSION" \
-androidVersionCode "$ANDROID_VERSION_CODE" \
-androidKeystoreName "$ANDROID_KEYSTORE_NAME" \
-androidKeystorePass "$ANDROID_KEYSTORE_PASS" \
-androidKeyaliasName "$ANDROID_KEYALIAS_NAME" \
-androidKeyaliasPass "$ANDROID_KEYALIAS_PASS" \
$CUSTOM_PARAMETERS
# Catch exit code
BUILD_EXIT_CODE=$?
@@ -121,13 +142,33 @@ else
echo "Build failed, with exit code $BUILD_EXIT_CODE";
fi
#
# Permissions
#
# Make a given user owner of all artifacts
if [[ -n "$CHOWN_FILES_TO" ]]; then
chown -R "$CHOWN_FILES_TO" "$BUILD_PATH_FULL"
chown -R "$CHOWN_FILES_TO" "$UNITY_PROJECT_PATH"
fi
# Add read permissions for everyone to all artifacts
chmod -R a+r "$BUILD_PATH_FULL"
chmod -R a+r "$UNITY_PROJECT_PATH"
# Add execute permissions to specific files
if [[ "$BUILD_TARGET" == "StandaloneOSX" ]]; then
OSX_EXECUTABLE_PATH="$BUILD_PATH_FULL/StandaloneOSX.app/Contents/MacOS/*"
chmod +x "$OSX_EXECUTABLE_PATH"
fi
#
# Results
#
echo ""
echo "###########################"
echo "# Build directory #"
echo "# Build output #"
echo "###########################"
echo ""

20
dist/steps/return_license.sh vendored Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Run in ACTIVATE_LICENSE_PATH directory
echo "Changing to \"$ACTIVATE_LICENSE_PATH\" directory."
pushd "$ACTIVATE_LICENSE_PATH"
if [[ -n "$UNITY_SERIAL" ]]; then
#
# PROFESSIONAL (SERIAL) LICENSE MODE
#
# This will return the license that is currently in use.
#
unity-editor \
-logFile /dev/stdout \
-quit \
-returnlicense
fi
# Return to previous working directory
popd

View File

@@ -1,8 +1,11 @@
const esModules = ['lodash-es'].join('|');
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: { '^.+\\.(js|jsx)?$': 'babel-jest' },
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest',
},
verbose: true,
};

1
media/Discord-Logo.svg Normal file
View File

@@ -0,0 +1 @@
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 272.1"><style>.st0{fill:#7289DA;}</style><path class="st0" d="M142.8 120.1c-5.7 0-10.2 4.9-10.2 11s4.6 11 10.2 11c5.7 0 10.2-4.9 10.2-11s-4.6-11-10.2-11zM106.3 120.1c-5.7 0-10.2 4.9-10.2 11s4.6 11 10.2 11c5.7 0 10.2-4.9 10.2-11 .1-6.1-4.5-11-10.2-11z"/><path class="st0" d="M191.4 36.9h-134c-11.3 0-20.5 9.2-20.5 20.5v134c0 11.3 9.2 20.5 20.5 20.5h113.4l-5.3-18.3 12.8 11.8 12.1 11.1 21.6 18.7V57.4c-.1-11.3-9.3-20.5-20.6-20.5zm-38.6 129.5s-3.6-4.3-6.6-8c13.1-3.7 18.1-11.8 18.1-11.8-4.1 2.7-8 4.6-11.5 5.9-5 2.1-9.8 3.4-14.5 4.3-9.6 1.8-18.4 1.3-25.9-.1-5.7-1.1-10.6-2.6-14.7-4.3-2.3-.9-4.8-2-7.3-3.4-.3-.2-.6-.3-.9-.5-.2-.1-.3-.2-.4-.2-1.8-1-2.8-1.7-2.8-1.7s4.8 7.9 17.5 11.7c-3 3.8-6.7 8.2-6.7 8.2-22.1-.7-30.5-15.1-30.5-15.1 0-31.9 14.4-57.8 14.4-57.8 14.4-10.7 28-10.4 28-10.4l1 1.2c-18 5.1-26.2 13-26.2 13s2.2-1.2 5.9-2.8c10.7-4.7 19.2-5.9 22.7-6.3.6-.1 1.1-.2 1.7-.2 6.1-.8 13-1 20.2-.2 9.5 1.1 19.7 3.9 30.1 9.5 0 0-7.9-7.5-24.9-12.6l1.4-1.6s13.7-.3 28 10.4c0 0 14.4 25.9 14.4 57.8 0-.1-8.4 14.3-30.5 15zM303.8 79.7h-33.2V117l22.1 19.9v-36.2h11.8c7.5 0 11.2 3.6 11.2 9.4v27.7c0 5.8-3.5 9.7-11.2 9.7h-34v21.1h33.2c17.8.1 34.5-8.8 34.5-29.2v-29.8c.1-20.8-16.6-29.9-34.4-29.9zm174 59.7v-30.6c0-11 19.8-13.5 25.8-2.5l18.3-7.4c-7.2-15.8-20.3-20.4-31.2-20.4-17.8 0-35.4 10.3-35.4 30.3v30.6c0 20.2 17.6 30.3 35 30.3 11.2 0 24.6-5.5 32-19.9l-19.6-9c-4.8 12.3-24.9 9.3-24.9-1.4zM417.3 113c-6.9-1.5-11.5-4-11.8-8.3.4-10.3 16.3-10.7 25.6-.8l14.7-11.3c-9.2-11.2-19.6-14.2-30.3-14.2-16.3 0-32.1 9.2-32.1 26.6 0 16.9 13 26 27.3 28.2 7.3 1 15.4 3.9 15.2 8.9-.6 9.5-20.2 9-29.1-1.8l-14.2 13.3c8.3 10.7 19.6 16.1 30.2 16.1 16.3 0 34.4-9.4 35.1-26.6 1-21.7-14.8-27.2-30.6-30.1zm-67 55.5h22.4V79.7h-22.4v88.8zM728 79.7h-33.2V117l22.1 19.9v-36.2h11.8c7.5 0 11.2 3.6 11.2 9.4v27.7c0 5.8-3.5 9.7-11.2 9.7h-34v21.1H728c17.8.1 34.5-8.8 34.5-29.2v-29.8c0-20.8-16.7-29.9-34.5-29.9zm-162.9-1.2c-18.4 0-36.7 10-36.7 30.5v30.3c0 20.3 18.4 30.5 36.9 30.5 18.4 0 36.7-10.2 36.7-30.5V109c0-20.4-18.5-30.5-36.9-30.5zm14.4 60.8c0 6.4-7.2 9.7-14.3 9.7-7.2 0-14.4-3.1-14.4-9.7V109c0-6.5 7-10 14-10 7.3 0 14.7 3.1 14.7 10v30.3zM682.4 109c-.5-20.8-14.7-29.2-33-29.2h-35.5v88.8h22.7v-28.2h4l20.6 28.2h28L665 138.1c10.7-3.4 17.4-12.7 17.4-29.1zm-32.6 12h-13.2v-20.3h13.2c14.1 0 14.1 20.3 0 20.3z"/></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -1,49 +1,56 @@
{
"name": "unity-builder",
"version": "0.5.0",
"version": "2.0.0",
"description": "Build Unity projects for different platforms.",
"main": "builder/index.js",
"repository": "git@github.com:webbertakken/unity-builder.git",
"main": "dist/index.js",
"repository": "git@github.com:game-ci/unity-builder.git",
"author": "Webber <webber@takken.io>",
"license": "MIT",
"scripts": {
"build": "ncc build src --out builder --minify",
"lint": "prettier --check \"src/**/*.js\" && eslint src",
"prebuild": "yarn",
"build": "tsc && ncc build lib --source-map --license licenses.txt",
"lint": "prettier --check \"src/**/*.{js,ts}\" && eslint src/**/*.ts",
"format": "prettier --write \"src/**/*.{js,ts}\"",
"test": "jest"
},
"dependencies": {
"@actions/core": "^1.2.0",
"@actions/exec": "1.0.2",
"@actions/github": "^2.0.0"
"@actions/core": "^1.2.6",
"@actions/exec": "^1.0.4",
"@actions/github": "^2.2.0",
"aws-sdk": "^2.812.0",
"base-64": "^1.0.0",
"kubernetes-client": "^9.0.0",
"nanoid": "3.1.20",
"semver": "^7.3.2"
},
"devDependencies": {
"@babel/cli": "7.7.5",
"@babel/core": "7.7.5",
"@babel/preset-env": "7.7.7",
"@zeit/ncc": "0.20.5",
"babel-eslint": "10.0.3",
"eslint": "6.7.2",
"eslint-config-airbnb": "18.0.1",
"eslint-config-prettier": "6.7.0",
"eslint-plugin-flowtype": "4.5.2",
"eslint-plugin-import": "2.19.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-react": "7.17.0",
"eslint-plugin-unicorn": "14.0.1",
"husky": "4.0.0-beta.5",
"jest": "24.9.0",
"lint-staged": "9.5.0",
"lodash-es": "4.17.15",
"prettier": "1.19.1"
"@types/jest": "^26.0.15",
"@types/node": "^14.14.9",
"@types/semver": "^7.3.4",
"@typescript-eslint/parser": "^4.8.1",
"@vercel/ncc": "^0.25.1",
"eslint": "^7.17.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-github": "^4.1.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-unicorn": "^28.0.2",
"husky": "4.2.5",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"js-yaml": "^3.14.0",
"lint-staged": "^10.5.4",
"prettier": "^2.2.1",
"ts-jest": "^26.4.4",
"typescript": "^4.1.3"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && yarn build && git add builder/index.js"
"pre-commit": "lint-staged && yarn build && git add dist/index.*"
}
},
"lint-staged": {
"*.{js,jsx}": [
"*.{js,jsx,ts,tsx}": [
"prettier --write",
"eslint",
"git add",
@@ -52,6 +59,9 @@
"*.{json,md,yaml,yml}": [
"prettier --write",
"git add"
],
"*.sh": [
"git update-index --chmod=+x"
]
}
}

Some files were not shown because too many files have changed in this diff Show More