From 0e67954c61595b53bb3a2f7d8b4d6ed3f9c2b48d Mon Sep 17 00:00:00 2001 From: Scion Date: Fri, 24 Mar 2023 01:45:02 -0700 Subject: [PATCH] added composite --- unity-composite/action.yaml | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 unity-composite/action.yaml diff --git a/unity-composite/action.yaml b/unity-composite/action.yaml new file mode 100644 index 0000000..2320935 --- /dev/null +++ b/unity-composite/action.yaml @@ -0,0 +1,62 @@ +name: unity-project +description: "Run a Unity command using a project's version and a build target." +inputs: + platform: + description: "Unity Platform. Options: windows, windows32bit, mac, linux, android" + required: true + email: + description: "Unity email." + required: true + password: + description: "Unity password." + required: true + command: + description: "Unity command to run." + required: false + unityBuilder: + description: "Whether or not to use the UnityBuilder instead of a Unity command." + required: false + cacheVolume: + description: "Name of the volume to cache the Library folder to." + required: true + artifactsVolume: + description: "Name of the volume to copy the artifacts to." + required: true + artifactsDirectory: + description: "Name of the directory to copy the artifacts from." + required: true + default: artifacts + zipName: + description: "Name of the resulting zip file." + required: false + removeContainer: + description: "Remove the mock container after building." + required: false + default: "false" +runs: + using: "composite" + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: act/unity/unity-project@master + with: + platform: ${{ inputs.platform }} + email: ${{ inputs.email }} + password: ${{ inputs.password }} + command: ${{ inputs.command }} + unityBuilder: ${{ inputs.unityBuilder }} + cacheVolume: ${{ inputs.cacheVolume }} + - name: "Compress build" + if: ${{ inputs.zipName }} + env: + WORKDIR: build + uses: act/common/utils/compress@master + with: + name: ../${{ inputs.artifactsDirectory }}/${{ inputs.zipName }} + files: . + - name: "Copy artifacts" + uses: act/common/docker/docker-cp@master + with: + recreateVolume: true + volume: ${{inputs.artifactsVolume }} + fromPath: ${{ inputs.artifactsDirectory }}/.