Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
287e3c9
added cloud project to player settings
andygruening Oct 28, 2025
fd1efd5
added debug console
andygruening Oct 28, 2025
1ee9f70
updated scene to build
andygruening Oct 29, 2025
3b0e0b5
updated cloud project id
andygruening Oct 29, 2025
1e900a6
Merge branch 'master' into Feature/build-automation
andygruening Oct 29, 2025
93281eb
temp unignored config file
andygruening Oct 29, 2025
c3543b2
create pre build script to create config file from environment variables
andygruening Nov 4, 2025
6b2e86a
added google/apple client id refs in config creator
andygruening Nov 4, 2025
188161b
unignored tmp default assets
andygruening Nov 4, 2025
c2005aa
added DidReloadScripts inside VersionSetter
andygruening Nov 4, 2025
09f6231
added unity-cloud-check workflow
andygruening Nov 4, 2025
a4050a0
removed unity-tests workflow
andygruening Nov 4, 2025
10cab7e
removed step to run unity tests
andygruening Nov 4, 2025
b12eee8
added org and project id to workflow
andygruening Nov 4, 2025
e550fc0
reverted one change from the last commit
andygruening Nov 4, 2025
b8b1e18
Add production environment to test-and-build job
andygruening Nov 10, 2025
fd37491
Change environment from production to github-pages
andygruening Nov 10, 2025
2b77f62
Fix jq command to extract build number correctly
andygruening Nov 10, 2025
9e1834a
Added branch name retrieval in Cloud Build trigger
andygruening Nov 11, 2025
e8961a6
changed android gradle settings
andygruening Nov 11, 2025
058ed35
added TestflightUploadPostBuildScript
andygruening Nov 14, 2025
ccad98b
updated ios upload paths
andygruening Nov 14, 2025
e8c8dcb
updated project settings and ios upload script
andygruening Nov 14, 2025
4c0e1a3
parse .p8 file content from env values
andygruening Nov 14, 2025
66dce1c
testing ls command during build
andygruening Nov 14, 2025
685bd73
changed ls logs
andygruening Nov 14, 2025
886143a
changed to xc workspace directory
andygruening Nov 14, 2025
59b29d7
another ipa find log
andygruening Nov 14, 2025
4246840
change to testflight_upload.sh shell script
andygruening Nov 14, 2025
a3e6423
added AppleEncryptionPostBuild, changed logo
andygruening Nov 14, 2025
55ac2b1
set ios/android build numbers from UBAs build number
andygruening Nov 14, 2025
dad69e1
trying BUILD_TARGET_BUILD_NUMBER
andygruening Nov 14, 2025
386f8de
trying UCB_BUILD_NUMBER
andygruening Nov 14, 2025
a8d1f9f
trying to switch back to the scene inside packages
andygruening Nov 14, 2025
0f65613
workflow to trigger cloud build whenever a pr is merged
andygruening Nov 14, 2025
cb8bcd6
test change
andygruening Nov 14, 2025
074b11d
Merge pull request #337 from 0xsequence/Feature/test
andygruening Nov 14, 2025
067270e
trigger release on branch push
andygruening Nov 14, 2025
2fccff0
removed if statement on release
andygruening Nov 14, 2025
9e88752
changed to master
andygruening Nov 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/unity-cloud-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Unity Build Automation

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
test-and-build:
runs-on: ubuntu-latest
environment: github-pages

strategy:
fail-fast: false
matrix:
target:
- mac-desktop
- windows-desktop
- ios
- android

steps:
- uses: actions/checkout@v3

# ✅ Step 2 — Trigger Cloud Build for this target
- name: Trigger Cloud Build
id: trigger
run: |
branch_name="${{ github.head_ref || github.ref_name }}"

build_number=$(curl -s -X POST \
-H "Authorization: Basic ${{ secrets.UNITY_API_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"clean\": true, \"delay\": 0, \"commit\": null, \"headless\": true, \"branch\": \"$branch_name\"}" \
https://build-api.cloud.unity3d.com/api/v1/orgs/6872789246035/projects/5fac262b-e52e-42f7-a9d6-d4464b2ff80e/buildtargets/${{ matrix.target }}/builds \
| jq '.[0].build' )

echo "build_number=$build_number" >> $GITHUB_OUTPUT

# 📡 Step 3 — Poll Cloud Build result
- name: Poll Build Status
run: |
for i in {1..60}; do
status=$(curl -s \
-H "Authorization: Basic ${{ secrets.UNITY_API_KEY }}" \
https://build-api.cloud.unity3d.com/api/v1/orgs/6872789246035/projects/5fac262b-e52e-42f7-a9d6-d4464b2ff80e/buildtargets/${{ matrix.target }}/builds/${{ steps.trigger.outputs.build_number }} | jq -r '.buildStatus')

echo "Status: $status"

if [ "$status" = "success" ]; then exit 0; fi
if [ "$status" = "failed" ]; then exit 1; fi

sleep 60
done

echo "Build timed out"
exit 1
32 changes: 32 additions & 0 deletions .github/workflows/unity-cloud-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Unity Build Automation Release

on:
push:
branches:
- master

jobs:
run-on-merge:
runs-on: ubuntu-latest
environment: github-pages

strategy:
fail-fast: false
matrix:
target:
- ios-production

steps:
- uses: actions/checkout@v3

- name: Trigger Cloud Build
id: trigger
run: |
branch_name="${{ github.head_ref || github.ref_name }}"

build_number=$(curl -s -X POST \
-H "Authorization: Basic ${{ secrets.UNITY_API_KEY }}" \
-H "Content-Type: application/json" \
-d "{\"clean\": true, \"delay\": 0, \"commit\": null, \"headless\": true, \"branch\": \"$branch_name\"}" \
https://build-api.cloud.unity3d.com/api/v1/orgs/6872789246035/projects/5fac262b-e52e-42f7-a9d6-d4464b2ff80e/buildtargets/${{ matrix.target }}/builds \
| jq '.[0].build' )
53 changes: 0 additions & 53 deletions .github/workflows/unity-tests.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

# Plugins

/[Aa]ssets/TextMesh Pro/
/[Aa]ssets/TextMesh Pro.meta
# /[Aa]ssets/TextMesh Pro/
# /[Aa]ssets/TextMesh Pro.meta
# MemoryCaptures can get excessive in size.
# They also could contain extremely sensitive data
/[Mm]emoryCaptures/

# Package Manager formatting
/[Aa]ssets/TextMesh Pro
# /[Aa]ssets/TextMesh Pro
/[Aa]ssets/Resources
/[Aa]ssets/Resources.meta
/[Aa]ssets/Samples
Expand Down
3 changes: 3 additions & 0 deletions Assets/CloudBuild.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

100 changes: 100 additions & 0 deletions Assets/CloudBuild/testflight_upload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
#!/bin/bash

set -e

echo "=== TestFlight Upload Script Starting ==="

# Only upload if enabled
if [ "$ENABLE_TESTFLIGHT_UPLOAD" != "TRUE" ]; then
echo "ENABLE_TESTFLIGHT_UPLOAD != TRUE, skipping upload."
exit 0
fi

# Workspace (Unity Cloud Build sets this)
WORKSPACE="${WORKSPACE:-}"

if [ -z "$WORKSPACE" ]; then
echo "ERROR: WORKSPACE environment variable is not set."
exit 1
fi

echo "Workspace: $WORKSPACE"


# ----------------------------
# Locate IPA file
# ----------------------------

IPA_DIR="$WORKSPACE/.build/last/ios-production"
IPA_PATH="$IPA_DIR/build.ipa"

echo "Looking for IPA at: $IPA_PATH"

if [ ! -f "$IPA_PATH" ]; then
echo "IPA not found directly. Searching recursively under workspace..."
IPA_PATH=$(find "$WORKSPACE" -type f -name "*.ipa" | head -n 1)
fi

if [ -z "$IPA_PATH" ]; then
echo "ERROR: No IPA file found anywhere under $WORKSPACE"
exit 1
fi

echo "Using IPA file: $IPA_PATH"


# ----------------------------
# Write the .p8 key to disk
# ----------------------------

if [ -z "$APPSTORE_CONNECT_P8" ]; then
echo "ERROR: APPSTORE_CONNECT_P8 environment variable missing."
exit 1
fi

if [ -z "$APPSTORE_CONNECT_KEY_ID" ]; then
echo "ERROR: APPSTORE_CONNECT_KEY_ID missing."
exit 1
fi

if [ -z "$APPSTORE_CONNECT_ISSUER_ID" ]; then
echo "ERROR: APPSTORE_CONNECT_ISSUER_ID missing."
exit 1
fi

# Replace literal "\n" with real newlines
P8_CONTENT=$(printf "%b" "$APPSTORE_CONNECT_P8")

KEY_DIR="$HOME/.appstoreconnect/private_keys"
KEY_PATH="$KEY_DIR/AuthKey_${APPSTORE_CONNECT_KEY_ID}.p8"

mkdir -p "$KEY_DIR"

echo "Writing App Store Connect private key to:"
echo "$KEY_PATH"

printf "%b" "$P8_CONTENT" > "$KEY_PATH"


# ----------------------------
# Upload using altool
# ----------------------------

echo "Uploading IPA to TestFlight via altool…"

UPLOAD_CMD="xcrun altool --upload-app \
-f \"$IPA_PATH\" \
-t ios \
--apiKey $APPSTORE_CONNECT_KEY_ID \
--apiIssuer $APPSTORE_CONNECT_ISSUER_ID"

echo "Running: $UPLOAD_CMD"

if eval $UPLOAD_CMD; then
echo "=== Upload IPA to Appstore Connect finished successfully ==="
else
echo "=== Upload IPA to Appstore Connect FAILED ==="
exit 1
fi

echo "=== TestFlight Upload Script Completed ==="
3 changes: 3 additions & 0 deletions Assets/CloudBuild/testflight_upload.sh.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Assets/Plugins/Android/gradleTemplate.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ org.gradle.parallel=true
android.enableJetifier=true
android.useAndroidX=true
unityStreamingAssets=**STREAMING_ASSETS**
**ADDITIONAL_PROPERTIES**

android.enableR8=**MINIFY_WITH_R_EIGHT**
**ADDITIONAL_PROPERTIES**
2 changes: 2 additions & 0 deletions Assets/Plugins/Android/mainTemplate.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ dependencies {
**DEPS**}

android {
namespace "com.unity3d.player"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'

Expand Down
9 changes: 9 additions & 0 deletions Assets/Plugins/IngameDebugConsole.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Plugins/IngameDebugConsole/Android.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#if (UNITY_EDITOR || UNITY_ANDROID) && UNITY_ANDROID_JNI
using System.Collections.Generic;
using UnityEngine;

// Credit: https://stackoverflow.com/a/41018028/2373034
namespace IngameDebugConsole
{
public class DebugLogLogcatListener : AndroidJavaProxy
{
private Queue<string> queuedLogs;
private AndroidJavaObject nativeObject;

public DebugLogLogcatListener() : base( "com.yasirkula.unity.DebugConsoleLogcatLogReceiver" )
{
queuedLogs = new Queue<string>( 16 );
}

~DebugLogLogcatListener()
{
Stop();

if( nativeObject != null )
nativeObject.Dispose();
}

public void Start( string arguments )
{
if( nativeObject == null )
nativeObject = new AndroidJavaObject( "com.yasirkula.unity.DebugConsoleLogcatLogger" );

nativeObject.Call( "Start", this, arguments );
}

public void Stop()
{
if( nativeObject != null )
nativeObject.Call( "Stop" );
}

[UnityEngine.Scripting.Preserve]
public void OnLogReceived( string log )
{
queuedLogs.Enqueue( log );
}

public string GetLog()
{
if( queuedLogs.Count > 0 )
return queuedLogs.Dequeue();

return null;
}
}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Loading
Loading