Skip to content

Commit 68615e4

Browse files
[#61] Trim platform-specific files from builds
- Windows builds: exclude macOS (.dylib) and Linux (.so) native libraries - macOS builds: exclude Windows (UnityFileSystemApi.dll) and Linux (.so) native libraries - Also exclude .pdb files from release artifacts
1 parent 148801b commit 68615e4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/.build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,22 @@ jobs:
5050
-p:UseAppHost=true
5151
-o publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}
5252
53+
- name: Remove platform-specific and debug files (Windows)
54+
if: matrix.os == 'windows'
55+
run: |
56+
Remove-Item -Path "publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}/*.dylib" -Force -ErrorAction SilentlyContinue
57+
Remove-Item -Path "publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}/*.so" -Force -ErrorAction SilentlyContinue
58+
Remove-Item -Path "publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}/*.pdb" -Force -ErrorAction SilentlyContinue
59+
shell: pwsh
60+
61+
- name: Remove platform-specific and debug files (macOS)
62+
if: matrix.os == 'macos'
63+
run: |
64+
rm -f publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}/UnityFileSystemApi.dll
65+
rm -f publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}/*.so
66+
rm -f publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}/*.pdb
67+
shell: bash
68+
5369
- name: Upload artifact
5470
uses: actions/upload-artifact@v4
5571
with:

0 commit comments

Comments
 (0)