[#115] analyze fails when nothing was successfully analyzed (#137) #79
This file contains hidden or 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 UnityDataTool | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: 'Build environment' | |
| default: 'release' | |
| required: true | |
| type: choice | |
| options: | |
| - debug | |
| - release | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| env: | |
| environment: ${{ inputs.environment || 'release' }} | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: windows | |
| arch: x64 | |
| runner: windows-latest | |
| nativelib: UnityFileSystemApi.dll | |
| - os: macos | |
| arch: arm64 | |
| runner: macos-latest | |
| nativelib: UnityFileSystemApi.dylib | |
| - os: linux | |
| arch: x64 | |
| runner: ubuntu-latest | |
| nativelib: UnityFileSystemApi.so | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Publish UnityDataTool (${{ matrix.os }}-${{ matrix.arch }}-${{ env.environment }}) | |
| run: > | |
| dotnet publish UnityDataTool | |
| -c ${{ env.environment }} | |
| -a ${{ matrix.arch }} | |
| -p:PublishSingleFile=true | |
| -p:UseAppHost=true | |
| -o publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }} | |
| - name: Remove other platforms' native libraries and debug files | |
| run: | | |
| dest="publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}" | |
| rm -f "$dest"/*.pdb | |
| for lib in UnityFileSystemApi.dll UnityFileSystemApi.dylib UnityFileSystemApi.so; do | |
| [ "$lib" = "${{ matrix.nativelib }}" ] || rm -f "$dest/$lib" | |
| done | |
| shell: bash | |
| - name: Add documentation to package | |
| run: | | |
| dest="publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }}" | |
| cp README.md LICENSE.md "$dest/" | |
| cp -R Documentation "$dest/" | |
| shell: bash | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: UnityDataTool-${{ matrix.os }}-${{ matrix.arch }}-${{ env.environment }} | |
| path: publish/${{ matrix.os }}/${{ matrix.arch }}-${{ env.environment }} |