Skip to content

Commit c4a9be2

Browse files
committed
Change don't try to build webgl1 for unity 2023.x+
Webgl1 is removed as a build target starting with unity 2023.1
1 parent 6638022 commit c4a9be2

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

.github/workflows/upgrade-unity.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,29 @@ jobs:
164164
- name: Add tags
165165
if: ${{ inputs.createTags || inputs.tagsOnly }}
166166
run: |
167+
# Extract the first four characters of UNITY_VERSION
168+
UNITY_YEAR=${UNITY_VERSION:0:4}
169+
167170
if [[ "$URP_BRANCH" == "true" ]]
168171
then
169-
git tag -a -f $UNITY_VERSION-urp-webgl1 -m "[Automated workflow] Created by upgrade-unity"
172+
if [[ "$UNITY_YEAR" < "2023" ]]
173+
then
174+
git tag -a -f $UNITY_VERSION-urp-webgl1 -m "[Automated workflow] Created by upgrade-unity"
175+
fi
170176
git tag -a -f $UNITY_VERSION-urp-webgl2 -m "[Automated workflow] Created by upgrade-unity"
171177
git tag -a -f $UNITY_VERSION-urp-webgl2-debug -m "[Automated workflow] Created by upgrade-unity"
172178
else
173-
git tag -a -f $UNITY_VERSION-minsize-webgl1 -m "[Automated workflow] Created by upgrade-unity"
174-
git tag -a -f $UNITY_VERSION-webgl1 -m "[Automated workflow] Created by upgrade-unity"
175-
git tag -a -f $UNITY_VERSION-webgl2 -m "[Automated workflow] Created by upgrade-unity"
179+
if [[ "$UNITY_YEAR" < "2023" ]]
180+
then
181+
git tag -a -f $UNITY_VERSION-minsize-webgl1 -m "[Automated workflow] Created by upgrade-unity"
182+
git tag -a -f $UNITY_VERSION-webgl1 -m "[Automated workflow] Created by upgrade-unity"
183+
else
184+
git tag -a -f $UNITY_VERSION-minsize-webgl2 -m "[Automated workflow] Created by upgrade-unity"
185+
fi
176186
# Push tags in between - pushing more than 3 tags won't trigger tag workflows
177187
git push origin -f --tags
188+
189+
git tag -a -f $UNITY_VERSION-webgl2 -m "[Automated workflow] Created by upgrade-unity"
178190
git tag -a -f $UNITY_VERSION-webgl2-debug -m "[Automated workflow] Created by upgrade-unity"
179191
fi
180192

0 commit comments

Comments
 (0)