This repository holds common GitHub Actions that are used in the various CAT and UnityCore repositories.
Scans Unity test runner results for failed tests and reports them as a new, action_required
check. Note that no
additional check is generated if all tests are passing.
name
- The name to assign to the generated check (optional; defaults totest-results
)files
- One or more XML filenames to analyze
Ensures that the CHANGELOG.md has been updated with each pull request.
github_token
- Valid GitHub API token (optional; will use workflow token if omitted)filename
- Filename to check for (optional; defaults to CHANGELOG.md)
If the JIRA ticket for a given pull request is labeled with Documentation
, the pull request is scanned for
documentation updates.
github_token
- Valid GitHub API token (optional; will use workflow token if omittted)jira_user
- Username for JIRA authentication (optional; will useCONFLUENCE_USER
is omitted)jira_password
- Password for JIRA authentication (optional; will useCONFLUENCE_PASSWORD
is omitted)
Creates a zip file and package.json for a given package suitable for distribution or publishing to Artifactory.
artifactory_root
- The root URI to use for Artifactory publishingpackage_version
- The version number being published in Semantic Versioning formatsource_path
- The absolute path to the source files to be packaged
json_path
- Absolute path to the generatedpackage.json
filezip_path
- Absolute path to the generated zip file containing the package contents
Analyses the output of automated performance tests. Depending upon the provided inputs, this action will either:
- Generate alerts for significant changes in performance as compared to historical data
- Ingest new metrics into the database for future comparison
operation
- Which operation should be performed; may be one of: (compare
,ingest
)database_path
- Path to the SQLite database that should be queried and updatedinput_path
- Path to the CSV file containing the performance metrics
alerts
- Any alerts that may be generated by thecompare
operation
A more general purpose action for posting comments to GitHub pull requests.
github_token
- Valid GitHub API token (optional; will use workflow token if omitted)title
- A title for the comment; used for selecting existing comments withmode
body
- The body text of the commentmode
- One of the following options; specifies how the action should behave if an existing comment is foundamend
- Behaves the same asreplace
, except the previous body is kept withstrikethroughmarkupcreate
- Always create a new commentnew
- Only post the comment if no existing match was foundreplace
- Replace an existing comment, if one is found, otherwise create a new comment
Checks the pull request for a JIRA ticket number and adds a comment linking back to it.
github_token
- Valid GitHub API token (optional; will use workflow token if omitted)
Sends a release notification message to a Slack channel.
token
- A valid Slack API tokenchannel
- The name of the channel to post the message toproject_name
- The name of the project being releasedversion
- The version number that is being released
Create a new release tag in the repository.
token
- A valid GitHub API tokenversion
- The release version number (used as the release tag name)ref
- The commit or branch being published.
Manipulate script define symbols for a Unity project externally.
project_path
- Path to the root of the Unity project (optional; defaults to the current workspace)remove_symbols
- Should symbols be removed rather than added? (optional; defaults tofalse
)symbols
- List of define symbols to be added or removed, separated by,
or;
platforms
- List of platforms to modify, separated by,
or;
(optional; by default will modify all platforms in the project)
Update the changelog to commit the current unreleased changes to the new version number and create a new unreleased block.
version
- The version number that was released
Update the version number in the local package.json file so that it interacts correctly with the package manager.
version
- The new active version number of the package
Create a build using UBP. This supports both UnityCore version and UC UBP SDK version.
jsonFiles
- The JSON files you want to build with space delimited.- Files with
%PROJECT_PATH%
will have the UBP Saved Project settings path inserted. - Files that start with
./
will use what ever directory was last used.
- Files with
platform
- The platform that UBP will build for.- Supported Platforms: AndroidGoogle, AndroidAmazon, AndroidSamsung, AndroidFacebook, WebGLFacebook, IOS, MacOS, Win, Win64
unityVersion
- The version of Unity to build with.override
- The JSON string to use for the override file.- To create the JSON it is recommended to use object-remap.
- (optional)
buildMethod
allow usage of a custom build method (IE older version of UBP).- Defaults to
JamCity.UnityCore.UnifiedBuildPipelineSdk.Editor.Commands.BuildPlayerFromFile
.
- Defaults to
- (optional)
logFile
allows setting of custom logfile.- Defaults to
-
which means it will log directly to the console.
- Defaults to
- (optional)
unityLocation
Allows setting of custom location where the different version of unity are stored.- Defaults to
/Applications/Unity/Hub/Editor/
- Defaults to
steps:
- name: 'Make JSON Package'
id: JSON_STEP
uses: nickofthyme/object-remap@v1
with:
standardConfig.version: ${{github.event.inputs.version}}
standardConfig.buildID: ${{github.run_number}}
- name: 'Build Package'
uses: mindjolt/uc-actions/build-with-ubp@v9
with:
platform: ${{github.event.inputs.platform}}
unityVersion: ${{github.event.inputs.unityVersion}}
files: ${{github.event.inputs.primaryBuildJob}} ./${{github.event.inputs.platform}}.json
override: ${{steps.JSON_STEP.outputs.json}}