Skip to content

Commit 2da09ce

Browse files
ci: address PR review nits
- create-demo-env: route inputs through step env to avoid the documented Actions script-injection pattern. Same behavior; values arrive as environment variables instead of being textually substituted into the shell program. - e2e.yml: rebase the iOS DerivedData cache key on inputs that exist at checkout time (manifest.json, ProjectVersion.txt, ProjectSettings.asset, com.onesignal.unity.{ios,core}/Editor/**, ExportOptions.plist) instead of the Unity-exported pbxproj/Podfile, which don't exist when the cache step runs and caused the key to collapse to a single global slot. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1008d4b commit 2da09ce

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

.github/actions/create-demo-env/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ runs:
1717
- name: Write .env
1818
working-directory: examples/demo
1919
shell: bash
20+
env:
21+
APP_ID: ${{ inputs.onesignal-app-id }}
22+
API_KEY: ${{ inputs.onesignal-api-key }}
23+
E2E_MODE: ${{ inputs.e2e-mode }}
2024
run: |
2125
{
22-
echo "ONESIGNAL_APP_ID=${{ inputs.onesignal-app-id }}"
23-
echo "ONESIGNAL_API_KEY=${{ inputs.onesignal-api-key }}"
24-
echo "E2E_MODE=${{ inputs.e2e-mode }}"
26+
echo "ONESIGNAL_APP_ID=$APP_ID"
27+
echo "ONESIGNAL_API_KEY=$API_KEY"
28+
echo "E2E_MODE=$E2E_MODE"
2529
} > .env

.github/workflows/e2e.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,14 @@ jobs:
111111
restore-keys: unity-library-ios-
112112

113113
- name: Cache Xcode DerivedData
114+
# Hash inputs to the Unity iOS export (files that exist at checkout
115+
# time) rather than the exported Xcode project / Podfile, which
116+
# don't exist until later steps run. Mirrors the Android Unity
117+
# Library cache key shape above.
114118
uses: actions/cache@v5
115119
with:
116120
path: examples/demo/Build/iOS-DerivedData
117-
key: deriveddata-${{ runner.os }}-${{ hashFiles('examples/demo/Build/iOS/Unity-iPhone.xcodeproj/project.pbxproj', 'examples/demo/Build/iOS/Podfile') }}
121+
key: deriveddata-${{ runner.os }}-${{ hashFiles('examples/demo/Packages/manifest.json', 'examples/demo/ProjectSettings/ProjectVersion.txt', 'examples/demo/ProjectSettings/ProjectSettings.asset', 'com.onesignal.unity.ios/Editor/**', 'com.onesignal.unity.core/Editor/**', 'examples/demo/iOS/ExportOptions.plist') }}
118122
restore-keys: deriveddata-${{ runner.os }}-
119123

120124
- name: Export Xcode project from Unity

0 commit comments

Comments
 (0)