Skip to content

Commit

Permalink
Remove unused getting unity version method
Browse files Browse the repository at this point in the history
  • Loading branch information
VeyronSakai committed Apr 28, 2024
1 parent 7eea967 commit 1f3e099
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@ jobs:
needs: paths-filter
if: ${{ (github.event_name == 'pull_request' && needs.paths-filter.outputs.should-build == 'true') || github.event_name == 'workflow_dispatch'}}
runs-on: ubuntu-latest
outputs:
unity-version: ${{ steps.get-unity-version.outputs.unity-version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: ProjectSettings/ProjectVersion.txt
clean: "${{ env.CLEAN }}"
- name: Get Unity version
id: get-unity-version
run: |
echo "UNITY_VERSION=$(grep "m_EditorVersion:" < ProjectSettings/ProjectVersion.txt | cut -d" " -f2)" >> "${GITHUB_ENV}"
echo "unity-version=$(grep "m_EditorVersion:" < ProjectSettings/ProjectVersion.txt | cut -d" " -f2)" >> "${GITHUB_OUTPUT}"
android:
name: Android
Expand All @@ -57,11 +60,9 @@ jobs:
- uses: actions/checkout@v4
with:
clean: "${{ env.CLEAN }}"
- name: Get Unity version
run: |
echo "UNITY_VERSION=$(grep "m_EditorVersion:" < ProjectSettings/ProjectVersion.txt | cut -d" " -f2)" >> "${GITHUB_ENV}"
- name: Android Build
env:
UNITY_VERSION: ${{ needs.get-unity-version.outputs.unity-version }}
ANDROID_NDK_ROOT: "/Applications/Unity/Hub/Editor/${UNITY_VERSION}/PlaybackEngines/AndroidPlayer/NDK"
run: |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \
Expand All @@ -81,10 +82,9 @@ jobs:
- uses: actions/checkout@v4
with:
clean: "${{ env.CLEAN }}"
- name: Get Unity version
run: |
echo "UNITY_VERSION=$(grep "m_EditorVersion:" < ProjectSettings/ProjectVersion.txt | cut -d" " -f2)" >> "${GITHUB_ENV}"
- name: iOS Build
env:
UNITY_VERSION: ${{ needs.get-unity-version.outputs.unity-version }}
run: |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \
-quit \
Expand All @@ -103,10 +103,9 @@ jobs:
- uses: actions/checkout@v4
with:
clean: "${{ env.CLEAN }}"
- name: Get Unity version
run: |
echo "UNITY_VERSION=$(grep "m_EditorVersion:" < ProjectSettings/ProjectVersion.txt | cut -d" " -f2)" >> "${GITHUB_ENV}"
- name: macOS Build
env:
UNITY_VERSION: ${{ needs.get-unity-version.outputs.unity-version }}
run: |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \
-quit \
Expand All @@ -125,10 +124,9 @@ jobs:
- uses: actions/checkout@v4
with:
clean: "${{ env.CLEAN }}"
- name: Get Unity version
run: |
echo "UNITY_VERSION=$(grep "m_EditorVersion:" < ProjectSettings/ProjectVersion.txt | cut -d" " -f2)" >> "${GITHUB_ENV}"
- name: macOS Build
env:
UNITY_VERSION: ${{ needs.get-unity-version.outputs.unity-version }}
run: |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \
-quit \
Expand Down

0 comments on commit 1f3e099

Please sign in to comment.