Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
uses: ./.github/workflows/create-unity-matrix.yml
with:
event-name: ${{ github.event_name }}
head-ref: ${{ github.head_ref }}

sdk:
strategy:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/create-unity-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
description: 'Event name (pull_request, push, etc.)'
required: true
type: string
head-ref:
description: 'PR head branch name'
required: false
type: string
default: ''
outputs:
unity-matrix:
description: 'Unity version matrix'
Expand All @@ -29,10 +34,15 @@ jobs:
shell: bash
env:
EVENT_NAME: ${{ inputs.event-name }}
HEAD_REF: ${{ inputs.head-ref }}
PR_UNITY_VERSIONS_VALUE: ${{ env.PR_UNITY_VERSIONS }}
FULL_UNITY_VERSIONS_VALUE: ${{ env.FULL_UNITY_VERSIONS }}
run: |
if [[ "$EVENT_NAME" == "pull_request" ]]; then
# Unity-bump PRs follow the naming convention `chore/unity-<version>`
# The bumps only need to run on those specific versions
if [[ "$EVENT_NAME" == "pull_request" && "$HEAD_REF" =~ ^chore/unity-([0-9]+\.[0-9]+)\. ]]; then
versions="[\"${BASH_REMATCH[1]}\"]"
elif [[ "$EVENT_NAME" == "pull_request" ]]; then
versions="$PR_UNITY_VERSIONS_VALUE"
else
versions="$FULL_UNITY_VERSIONS_VALUE"
Expand Down
Loading