Update files for release #58
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
clean: | |
type: boolean | |
default: false | |
description: "clean" | |
env: | |
CLEAN: ${{ github.event.inputs.clean || false }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
paths-filter: | |
name: Paths Filter | |
runs-on: ubuntu-latest | |
outputs: | |
should-build: ${{ steps.filter.outputs.should-build }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
should-build: | |
- Assets/**/* | |
- ProjectSettings/**/* | |
- Packages/**/* | |
- .github/workflows/build.yml | |
get-unity-version: | |
name: Get Unity Version | |
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 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
sparse-checkout: ProjectSettings/ProjectVersion.txt | |
clean: "${{ env.CLEAN }}" | |
- name: Get Unity version | |
run: | | |
echo "UNITY_VERSION=$(grep "m_EditorVersion:" < ProjectSettings/ProjectVersion.txt | cut -d" " -f2)" >> "${GITHUB_ENV}" | |
android: | |
name: Android | |
needs: get-unity-version | |
runs-on: [self-hosted, macOS] | |
steps: | |
- name: Switch workspace | |
uses: DeNA/setup-job-workspace-action@fea4ef4d011492fe235833241acbb4fced82da27 | |
- 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: | |
ANDROID_NDK_ROOT: "/Applications/Unity/Hub/Editor/${UNITY_VERSION}/PlaybackEngines/AndroidPlayer/NDK" | |
run: | | |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \ | |
-quit \ | |
-batchmode \ | |
-nographics \ | |
-projectPath "$(pwd)" \ | |
-executeMethod Editor.BuildEntryPoint.BuildAndroid | |
ios: | |
name: iOS | |
needs: get-unity-version | |
runs-on: [self-hosted, macOS] | |
steps: | |
- name: Switch workspace | |
uses: DeNA/setup-job-workspace-action@fea4ef4d011492fe235833241acbb4fced82da27 | |
- 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 | |
run: | | |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \ | |
-quit \ | |
-batchmode \ | |
-nographics \ | |
-projectPath "$(pwd)" \ | |
-executeMethod Editor.BuildEntryPoint.BuildIOS | |
macos: | |
name: macOS | |
needs: get-unity-version | |
runs-on: [self-hosted, macOS] | |
steps: | |
- name: Switch workspace | |
uses: DeNA/setup-job-workspace-action@fea4ef4d011492fe235833241acbb4fced82da27 | |
- 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 | |
run: | | |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \ | |
-quit \ | |
-batchmode \ | |
-nographics \ | |
-projectPath "$(pwd)" \ | |
-executeMethod Editor.BuildEntryPoint.BuildMacOS | |
webgl: | |
name: WebGL | |
needs: get-unity-version | |
runs-on: [self-hosted, macOS] | |
steps: | |
- name: Switch workspace | |
uses: DeNA/setup-job-workspace-action@fea4ef4d011492fe235833241acbb4fced82da27 | |
- 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 | |
run: | | |
/Applications/Unity/Hub/Editor/"${UNITY_VERSION}"/Unity.app/Contents/MacOS/Unity \ | |
-quit \ | |
-batchmode \ | |
-nographics \ | |
-projectPath "$(pwd)" \ | |
-executeMethod Editor.BuildEntryPoint.BuildWebGL |