Skip to content

Commit

Permalink
feat: add return-license parameter in build and test jobs (#29)
Browse files Browse the repository at this point in the history
* Add parameter return-license in build job

* Add message

* fix logic

* feat: change `return-license` default to false

* feat: make `return-license` optional in the `test` job

Co-authored-by: Eric Ribeiro <[email protected]>
  • Loading branch information
tadashi0713 and EricRibeiro authored Sep 19, 2022
1 parent 9e6d361 commit cc81411
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
15 changes: 12 additions & 3 deletions src/jobs/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ parameters:
Whether to compress the build output to a ".tar.gz" archive.
This is recommended if you want to download the built artifacts from the CircleCI web app.
If left to "false" for decompressed WebGL builds, you can run the project directly from the CircleCI web app.
return-license:
type: boolean
default: false
description: |
Whether to return the license used to build the project.
Unity only allows returning professional licenses.
executor: << parameters.executor >>

Expand All @@ -81,6 +87,9 @@ steps:
project-path: <<parameters.project-path>>
store-artifacts: <<parameters.store-artifacts>>
compress: <<parameters.compress>>
- return-license:
unity-username-var-name: << parameters.unity-username-var-name >>
unity-password-var-name: << parameters.unity-password-var-name >>
- when:
condition: <<parameters.return-license>>
steps:
- return-license:
unity-username-var-name: << parameters.unity-username-var-name >>
unity-password-var-name: << parameters.unity-password-var-name >>
15 changes: 12 additions & 3 deletions src/jobs/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ parameters:
Specify the test platform to run tests on.
Valid values are "editmode", "playmode" and Unity's target builds.
More information can be found on: https://docs.unity3d.com/Packages/[email protected]/manual/reference-command-line.html
return-license:
type: boolean
default: false
description: |
Whether to return the license used to test the project.
Unity only allows returning professional licenses.
executor: << parameters.executor >>

Expand All @@ -61,6 +67,9 @@ steps:
step-name: << parameters.step-name >>
test-platform: << parameters.test-platform >>
project-path: << parameters.project-path >>
- return-license:
unity-username-var-name: << parameters.unity-username-var-name >>
unity-password-var-name: << parameters.unity-password-var-name >>
- when:
condition: <<parameters.return-license>>
steps:
- return-license:
unity-username-var-name: << parameters.unity-username-var-name >>
unity-password-var-name: << parameters.unity-password-var-name >>

0 comments on commit cc81411

Please sign in to comment.