@akiojin/unity-bulid-github-action

3.7.1 • Public • Published

unity-build-github-action

This action builds Unity and outputs ipa for iOS and apk/aab for Android. Supported version is Unity 2021.3 or later.

The following parameters are set at iOS build time.

  • ENABLE_BITCODE
  • ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

ENABLE_BITOCODE is set for UnityMainTarget and UnityFrameworkTarget. ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES is set to UnityFrameworkTarget.

See also the following URL for ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES.

https://forum.unity.com/threads/2019-3-validation-on-upload-to-store-gives-unityframework-framework-contains-disallowed-file.751112/

Requirement

You will need to install fastlane

Installation

brew install fastlane

Usage

Simple usage

iOS builds

- uses: akiojin/unity-build-github-action@v3
  with:
    build-target: 'iOS'

Team ID & Provisioning Profile UUID

- uses: akiojin/setup-xcode-environment-github-action@v2
  id: setup-xcode-environment
  with:
    type: ${{ env.DISTRIBUTION }}
    app-identifier: <App ID>
    team-id: <Team ID>
    git-url: ${{ secrets.APPLE_CERTIFICATE_GIT_URL }}
    git-passphrase: ${{ secrets.APPLE_CERTIFICATE_GIT_PASSPHRASE }}
    git-branch: "develop"
    keychain: ${{ steps.setup-temporary-keychain.outputs.keychain }}
    keychain-password: ${{ steps.setup-temporary-keychain.outputs.keychain-password }}

- uses: akiojin/unity-build-github-action@v3
  with:
    build-target: 'iOS'
    project-directory: ${{ github.workspace }}
    output-directory: ${{ runner.temp }}/Unity
    export-method: ${{ env.DISTRIBUTION }}
    team-id: <Team ID>
    provisioning-profile-uuid: ${{ steps.setup-xcode-environment.outputs.provisioning-profile-uuid }}

Android builds

- uses: akiojin/unity-build-github-action@v3
  with:
    build-target: 'Android'
    project-directory: ${{ github.workspace }}
    output-directory: ${{ runner.temp }}/Unity

Keystore

- uses: akiojin/unity-build-github-action@v3
  with:
    build-target: 'Android'
    project-directory: ${{ github.workspace }}
    output-directory: ${{ runner.temp }}/Unity
    keystore-base64: ${{ secrets.GOOGLE_KEYSTORE_BASE64 }}
    keystore-password: ${{ secrets.GOOGLE_KEYSTORE_PASSWORD }}
    keystore-alias: 'development'
    keystore-alias-password: ${{ secrets.GOOGLE_KEYSTORE_ALIAS_DEVELOPMENT_PASSWORD }}

Arguments

Common

Name Required Type Default Description
additional-arguments false string "" Specify additional required arguments.
build-target true string Allows the selection of an active build target before loading a project.

Possible options are:
Standalone, Win, Win64, OSXUniversal, Linux, Linux64, LinuxUniversal, iOS, Android, Web, WebStreamed, WebGL, XboxOne, PS4, WindowsStoreApps, Switch, N3DS, tvOS.
configuration false string Debug The configuration to use when building the app.

Possible options are:
Debug, Release.
execute-method false string "" Execute the static method as soon as Unity opens the project, and after the optional Asset server update is complete.
log-file false string "-" Specify where Unity writes the Editor or Windows/Linux/OSX standalone log file.
To output to the console, specify - for the path name.
On Windows, specify - option to make the output go to stdout, which is not the console by default.
output-directory false string $RUNNER_TEMP The directory in which the ipa/apk file should be stored in.
output-name false string "Build" Specifies the output file name.
project-directory true string Open the project at the given path. If the pathname contains spaces, enclose it in quotes.
unity-version false string "" Specify the Unity version to be used.
If omitted, the project version is used.

iOS

Name Required Type Default Description
export-method false string development Define the profile type, can be appstore, adhoc, development, enterprise, developer_id, mac_installer_distribution.
include-bitcode false boolean false Should the ipa file include bitcode?
include-symbols false boolean false Should the ipa file include symbols?
scheme false string Unity-iPhone The project's scheme.
sdk false string iphoneos The SDK that should be used for building the application.
team-id false string "" The ID of your Developer Portal team if you're in multiple teams.

Android

Name Required Type Default Description
keystore false string "" Specify the path to the keystore file.
For Android, if keystore or keystore-base64, keystore-password, keystore-alias,keystore-alias-password is not specified, will be signed with a debug key.
keystore-base64 false string "" Specifies Base64 data for the keystore.
If you do not specify a file path in keystore, you must specify this parameter.
Also, if this value is specified, the value of keystore is ignored.
keystore-password false string "" Specify the password for the keystore.
keystore-alias false string "" Specifies the name of the keystore alias.
keystore-alias-password false string "" Specify the password for the keystore alias.

License

Any contributions made under this project will be governed by the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i @akiojin/unity-bulid-github-action

Weekly Downloads

0

Version

3.7.1

License

MIT

Unpacked Size

442 kB

Total Files

48

Last publish

Collaborators

  • akiojin