Skip to content

Commit fc80d3d

Browse files
committed
Add better naming for PRs
1 parent 8c3c786 commit fc80d3d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/upgrade-unity.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232

3333
jobs:
3434
upgrade-unity-version:
35-
name: Upgrade Unity version and packages
35+
name: Upgrade Unity version and packages to ${{ inputs.unityVersion }}
3636
runs-on: ubuntu-latest
3737
strategy:
3838
fail-fast: false
@@ -106,6 +106,13 @@ jobs:
106106
run: |
107107
LAST_UNITY_VERSION=$(sed -n 's/^\m_EditorVersion: //p'< ./ProjectSettings/ProjectVersion.txt)
108108
echo "VERSION=$LAST_UNITY_VERSION" >> $GITHUB_OUTPUT
109+
BRANCH_NAME=${GITHUB_REF#refs/heads/}
110+
if [[ "$BRANCH_NAME" == *"urp"* ]]
111+
then
112+
echo "NAME=$LAST_UNITY_VERSION-urp" >> $GITHUB_OUTPUT
113+
else
114+
echo "NAME=$LAST_UNITY_VERSION" >> $GITHUB_OUTPUT
115+
fi
109116
110117
- name: Set upgrade name
111118
id: upgrade_name
@@ -123,6 +130,7 @@ jobs:
123130
- name: Log variables
124131
run: |
125132
echo "last_unity_version -> ${{ steps.last_unity_version.outputs.VERSION }}"
133+
echo "last_unity_name -> ${{ steps.last_unity_version.outputs.NAME }}"
126134
echo "upgrade_name -> ${{ steps.upgrade_name.outputs.NAME }}"
127135
128136
- name: Build project
@@ -159,10 +167,10 @@ jobs:
159167
uses: peter-evans/create-pull-request@v4
160168
with:
161169
token: ${{ secrets.PR_GITHUB_TOKEN }}
162-
commit-message: "[Automated workflow] upgrade-unity from ${{steps.last_unity_version.outputs.VERSION}} to ${{ inputs.unityVersion }}"
163-
branch: "ci/upgrade-unity/from-${{steps.last_unity_version.outputs.VERSION}}-to-${{ steps.upgrade_name.outputs.NAME }}"
170+
commit-message: "[Automated workflow] upgrade-unity from ${{steps.last_unity_version.outputs.NAME}} to ${{ inputs.unityVersion }}"
171+
branch: "ci/upgrade-unity/from-${{steps.last_unity_version.outputs.NAME}}-to-${{ steps.upgrade_name.outputs.NAME }}"
164172
delete-branch: true
165-
title: "[Automated workflow] upgrade-unity from ${{steps.last_unity_version.outputs.VERSION}} to ${{ steps.upgrade_name.outputs.NAME }}"
173+
title: "[Automated workflow] upgrade-unity from ${{steps.last_unity_version.outputs.NAME}} to ${{ steps.upgrade_name.outputs.NAME }}"
166174
body: ${{ steps.template.outputs.result }}
167175

168176
- name: Add tags

0 commit comments

Comments
 (0)