Skip to content

Commit 41e7807

Browse files
committed
add unity_cloud_build_profile_env
1 parent 86d64b1 commit 41e7807

File tree

2 files changed

+25
-19
lines changed

2 files changed

+25
-19
lines changed

action.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ def wait_for_successfull_build(client: UnityCloudClient, project_id:str, build_t
537537
@click.option("--org_id", envvar="UNITY_CLOUD_BUILD_ORG_ID", type=str)
538538
@click.option("--project_id", envvar="UNITY_CLOUD_BUILD_PROJECT_ID", type=str)
539539
@click.option("--primary_build_target", envvar="UNITY_CLOUD_BUILD_PRIMARY_TARGET", type=str)
540+
@click.option("--build_profile", envvar="UNITY_CLOUD_BUILD_PROFILE_ENV", type=str)
540541
@click.option(
541542
"--polling_interval",
542543
envvar="UNITY_CLOUD_BUILD_POLLING_INTERVAL",
@@ -569,6 +570,7 @@ def main(
569570
org_id: str,
570571
project_id: str,
571572
primary_build_target: str,
573+
build_profile: str,
572574
polling_interval: float,
573575
download_binary: bool,
574576
github_branch_ref: str,
@@ -668,7 +670,7 @@ def main(
668670
build_meta = builder.get_build_target_meta( allow_new_target )
669671

670672
# create a new env for the specified build target
671-
builder_env = builder.set_build_target_env_var(build_target_name, "buildProfile", "Release")
673+
builder_env = builder.set_build_target_env_var(build_target_name, "buildProfile", build_profile)
672674

673675
# create a new build for the specified build target
674676
build_number = builder.start_build(build_target_name)

action.yaml

+22-18
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,55 @@
1-
name: 'Run Unity Cloud Build'
2-
author: 'Condense <[email protected]>'
3-
description: 'Runs relevant build via Unity Cloud Build'
1+
name: "Run Unity Cloud Build"
2+
author: "Condense <[email protected]>"
3+
description: "Runs relevant build via Unity Cloud Build"
44
inputs:
55
unity_cloud_build_api_key:
6-
description: 'Unity Cloud Build API key'
6+
description: "Unity Cloud Build API key"
77
required: true
88
unity_cloud_build_org_id:
9-
description: 'Unity Cloud Build Org ID'
9+
description: "Unity Cloud Build Org ID"
1010
required: true
1111
unity_cloud_build_project_id:
12-
description: 'Unity Cloud Build Project ID'
12+
description: "Unity Cloud Build Project ID"
1313
required: true
1414
unity_cloud_build_polling_interval:
15-
description: 'Interval to poll Unity Cloud Build'
15+
description: "Interval to poll Unity Cloud Build"
1616
required: false
17-
default: '60'
17+
default: "60"
1818
unity_cloud_build_primary_target:
19-
description: 'Unity Cloud Build Primary Target ID'
19+
description: "Unity Cloud Build Primary Target ID"
20+
required: true
21+
unity_cloud_build_profile_env:
22+
description: "Unity Cloud buildProfile environment variable"
2023
required: true
2124
unity_cloud_build_download_binary:
22-
description: 'Download the build binary to env.ARTIFACT_FILEPATH'
25+
description: "Download the build binary to env.ARTIFACT_FILEPATH"
2326
required: false
2427
unity_cloud_build_create_share:
25-
description: 'Create a sharing url in UnityCloudBuild and output to env.SHARE_URL'
28+
description: "Create a sharing url in UnityCloudBuild and output to env.SHARE_URL"
2629
required: false
2730
unity_cloud_build_use_existing_build_number:
28-
description: 'Force the process to use an existing build number instead of starting a new build'
31+
description: "Force the process to use an existing build number instead of starting a new build"
2932
required: false
3033
unity_cloud_build_github_branch_ref:
31-
description: 'github branch reference to build (github.ref). This will create new build targets if the branch differs from the default target, to support pull requests and tags'
34+
description: "github branch reference to build (github.ref). This will create new build targets if the branch differs from the default target, to support pull requests and tags"
3235
required: true
3336
unity_cloud_build_github_head_ref:
34-
description: 'github.head_ref; only on pull requests and is the source branch; https://docs.github.com/en/actions/learn-github-actions/contexts'
37+
description: "github.head_ref; only on pull requests and is the source branch; https://docs.github.com/en/actions/learn-github-actions/contexts"
3538
required: false
3639
unity_cloud_build_allow_new_target:
37-
description: 'Set this to false to disable creation of new build targets/configurations based on the primary target.'
40+
description: "Set this to false to disable creation of new build targets/configurations based on the primary target."
3841
required: false
39-
42+
4043
runs:
41-
using: 'docker'
42-
image: 'Dockerfile'
44+
using: "docker"
45+
image: "Dockerfile"
4346
env:
4447
UNITY_CLOUD_BUILD_API_KEY: ${{ inputs.unity_cloud_build_api_key }}
4548
UNITY_CLOUD_BUILD_ORG_ID: ${{ inputs.unity_cloud_build_org_id }}
4649
UNITY_CLOUD_BUILD_PROJECT_ID: ${{ inputs.unity_cloud_build_project_id }}
4750
UNITY_CLOUD_BUILD_POLLING_INTERVAL: ${{ inputs.unity_cloud_build_polling_interval }}
4851
UNITY_CLOUD_BUILD_PRIMARY_TARGET: ${{ inputs.unity_cloud_build_primary_target }}
52+
UNITY_CLOUD_BUILD_PROFILE_ENV: ${{ inputs.unity_cloud_build_profile_env }}
4953
UNITY_CLOUD_BUILD_DOWNLOAD_BINARY: ${{ inputs.unity_cloud_build_download_binary }}
5054
UNITY_CLOUD_BUILD_CREATE_SHARE: ${{ inputs.unity_cloud_build_create_share }}
5155
UNITY_CLOUD_BUILD_USE_EXISTING_BUILD_NUMBER: ${{ inputs.unity_cloud_build_use_existing_build_number }}

0 commit comments

Comments
 (0)