Merge pull request #289 from Voltstro-Studios/master #494
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: | |
push | |
jobs: | |
#This job builds the Unity project | |
build-core: | |
name: 'Build-UWB-Core' | |
runs-on: ubuntu-22.04 | |
steps: | |
#Restore | |
- uses: actions/checkout@v3 | |
with: | |
path: 'UnityWebBrowserSource/' | |
#Setup the Environment | |
- uses: actions/setup-dotnet@v2 | |
name: Setup .NET | |
with: | |
dotnet-version: '8.0.x' | |
#Build shared | |
- name: Build Shared | |
shell: pwsh | |
run: '& ./publish-shared.ps1' | |
working-directory: UnityWebBrowserSource/src/DevScripts/ | |
#Restore Unity's cache | |
- name: Unity Cache | |
uses: actions/cache@v3 | |
with: | |
path: UnityWebBrowserSource/src/UnityWebBrowser.UnityProject/Library | |
key: Cache-Unity | |
#Build the Unity project | |
- name: Build Unity Project | |
uses: game-ci/unity-builder@v4 | |
env: | |
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} | |
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} | |
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }} | |
with: | |
projectPath: 'UnityWebBrowserSource/src/UnityWebBrowser.UnityProject/' | |
targetPlatform: StandaloneLinux64 | |
buildsPath: 'UnityWebBrowserSource/src/UnityWebBrowser.UnityProject/Builds' | |
versioning: Tag | |
#Create an output directory for artifacts | |
- name: Create Artifacts Staging Directory | |
shell: pwsh | |
run: mkdir ~/UWBStaging/ | |
#Pack UWB Core | |
- name: Pack Core Package | |
shell: pwsh | |
run: npm pack --pack-destination ~/UWBStaging/ | |
working-directory: UnityWebBrowserSource/src/Packages/UnityWebBrowser | |
#Pack UWB Communication Pipes | |
- name: Pack Communication Pipes Package | |
shell: pwsh | |
run: npm pack --pack-destination ~/UWBStaging/ | |
working-directory: UnityWebBrowserSource/src/Packages/UnityWebBrowser.Communication.Pipes | |
#Pack UWB UNIX Support | |
- name: Pack Unix Support Package | |
shell: pwsh | |
run: npm pack --pack-destination ~/UWBStaging/ | |
working-directory: UnityWebBrowserSource/src/Packages/UnityWebBrowser.Unix-Support | |
# Upload Packed Packages | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: UWB-Core | |
path: ~/UWBStaging/*.tgz | |
#Builds the CEF Engine | |
build-engine-cef: | |
name: 'Build-Engine-Cef' | |
runs-on: ubuntu-22.04 | |
steps: | |
#Checkout | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: 'recursive' | |
path: 'UnityWebBrowserSource/' | |
#Setup the Environment | |
- uses: actions/setup-dotnet@v2 | |
name: Setup .NET | |
with: | |
dotnet-version: '8.0.x' | |
#Download CEF (Linux) | |
- name: Download CEF (Linux) | |
shell: pwsh | |
run: '& ./download-cef-linux.ps1' | |
working-directory: UnityWebBrowserSource/src/DevScripts/ | |
#Download CEF (Windows) | |
- name: Download CEF (Windows) | |
shell: pwsh | |
run: '& ./download-cef-windows.ps1' | |
working-directory: UnityWebBrowserSource/src/DevScripts/ | |
#Build CEF Engine (Linux) | |
- name: Build CEF Engine (Linux) | |
shell: pwsh | |
run: '& ./publish-cef-engine-linux.ps1' | |
working-directory: UnityWebBrowserSource/src/DevScripts/ | |
#Build CEF Engine (Linux) | |
- name: Build CEF Engine (Windows) | |
shell: pwsh | |
run: '& ./publish-cef-engine-windows.ps1' | |
working-directory: UnityWebBrowserSource/src/DevScripts/ |