File tree Expand file tree Collapse file tree 2 files changed +28
-14
lines changed
actions/setup-environment Expand file tree Collapse file tree 2 files changed +28
-14
lines changed Original file line number Diff line number Diff line change 1+ name : ' Setup Environment'
2+ description : ' Common setup steps for Unity release workflows (Git config and environment prep)'
3+
4+ runs :
5+ using : ' composite'
6+ steps :
7+ - name : Configure Git
8+ shell : bash
9+ run : |
10+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
11+ git config --global user.name "github-actions[bot]"
12+
13+ - name : Prepare Environment
14+ env :
15+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
16+ shell : bash
17+ run : |
18+ sudo apt-get update
19+ sudo apt-get install -y gh jq || true
20+ gh auth status || gh auth login --with-token <<< "$GH_TOKEN"
21+
Original file line number Diff line number Diff line change 5757 uses : actions/checkout@v5
5858 with :
5959 ref : ${{ needs.prep.outputs.release_branch }}
60-
61- - name : Configure Git
62- run : |
63- git config --global user.email "github-actions[bot]@users.noreply.github.com"
64- git config --global user.name "github-actions[bot]"
65-
66- - name : Prepare Environment
67- env :
68- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69- run : |
70- sudo apt-get update
71- sudo apt-get install -y gh jq || true
72- gh auth status || gh auth login --with-token <<< "$GH_TOKEN"
60+
61+ - name : Setup Environment
62+ uses : ./.github/actions/setup-environment
7363
7464 - name : Get current native SDK versions
7565 id : current_versions
@@ -156,6 +146,9 @@ jobs:
156146 with :
157147 ref : ${{ needs.prep.outputs.release_branch }}
158148
149+ - name : Setup Environment
150+ uses : ./.github/actions/setup-environment
151+
159152 - name : Update Unity SDK version
160153 run : |
161154 echo "Updating Unity SDK version to ${{ inputs.unity_version }}"
@@ -201,7 +194,7 @@ jobs:
201194 - name : Cache Unity
202195 uses : actions/cache@v4
203196 with :
204- path : /home/runner/Unity/Hub/Editor
197+ path : /home/runner/Unity/Hub
205198 key : UnityEditor-${{ runner.os }}
206199 restore-keys : |
207200 UnityEditor-${{ runner.os }}
You can’t perform that action at this time.
0 commit comments