Skip to content

Commit

Permalink
Add SourceLink
Browse files Browse the repository at this point in the history
Update CI
  • Loading branch information
Voltstro committed Sep 9, 2024
1 parent 7b4e238 commit c158cfc
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 17 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build

on: push
on:
push:
branches:
- master
- release

jobs:
#This job builds the Unity project
Expand All @@ -11,7 +15,6 @@ jobs:
# Checkout Repo
- uses: actions/checkout@v4
with:
path: "UnityWebBrowserSource/"
fetch-depth: 0

#Setup the Environment
Expand All @@ -22,14 +25,14 @@ jobs:

# Build shared
- name: Build Shared
run: "python build_shared.py"
working-directory: UnityWebBrowserSource/src/DevScripts/
run: python build_shared.py
working-directory: src/DevScripts/

# Restore Unity's cache
- name: Unity Cache
uses: actions/cache@v4
with:
path: UnityWebBrowserSource/src/UnityWebBrowser.UnityProject/Library
path: src/UnityWebBrowser.UnityProject/Library
key: Cache-Unity

# Build the Unity project
Expand All @@ -40,28 +43,28 @@ jobs:
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: "UnityWebBrowserSource/src/UnityWebBrowser.UnityProject/"
projectPath: src/UnityWebBrowser.UnityProject/
targetPlatform: StandaloneLinux64
buildsPath: "UnityWebBrowserSource/src/UnityWebBrowser.UnityProject/Builds"
buildsPath: src/UnityWebBrowser.UnityProject/Builds
versioning: Tag

# Create an output directory for artifacts
- name: Create Artifacts Staging Directory
shell: pwsh
run: mkdir ~/UWBStaging/
run: mkdir ${{ github.workspace }}/UWBStaging/

# Pack UWB Core
- name: Pack Core Package
shell: pwsh
run: npm pack --pack-destination ~/UWBStaging/
working-directory: UnityWebBrowserSource/src/Packages/UnityWebBrowser
run: npm pack --pack-destination ${{ github.workspace }}/UWBStaging/
working-directory: src/Packages/UnityWebBrowser

# Upload Packed Packages
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: UWB-Core
path: ~/UWBStaging/*.tgz
path: ${{ github.workspace }}/UWBStaging/*.tgz

build-engine-cef:
strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.143">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.143">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

<PropertyGroup Condition="'$(IsReleaseBuild)'=='true'">
Expand All @@ -89,5 +90,9 @@
<SelfContained>true</SelfContained>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<Import Project="../../Imports/NatvieDefines.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@

<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.6.143">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup Condition="'$(IsMacOsBuild)'=='true'">
Expand Down Expand Up @@ -71,5 +72,9 @@
<SelfContained>true</SelfContained>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<Import Project="../../Imports/NatvieDefines.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<ItemGroup>
<PackageReference Include="VoltRpc" Version="3.2.0" />
<PackageReference Include="VoltRpc.Proxy.Generator" Version="2.3.0" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
</ItemGroup>

<!-- Create debug symbols since this will be shared with Unity as well -->
Expand All @@ -40,4 +42,8 @@
<Copy SourceFiles="$(OutputPath)$(AssemblyName).pdb" DestinationFiles="../Packages/UnityWebBrowser/Plugins/$(AssemblyName).pdb" />
</Target>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

</Project>

0 comments on commit c158cfc

Please sign in to comment.