Upload round trip report to release, not artifacts #66
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
| # This workflow will build a .NET project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
| name: .NET | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build --no-restore | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal --blame-hang-timeout 5min | |
| - name: Publish | |
| run: dotnet publish -c Release -o publish | |
| - name: Create Zip Archive | |
| run: | | |
| Compress-Archive -Path publish/* -DestinationPath MiloEditor.zip | |
| - name: Create Release | |
| id: create_release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: continuous-${{ github.run_number }} | |
| release_name: Continuous Build ${{ github.run_number }} | |
| body: | | |
| Build automatically generated from commit ${{ github.sha }}. This build may have bugs and/or corrupt Milo scenes - use with caution. | |
| draft: false | |
| prerelease: true | |
| - name: Upload Test Report to Release | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: '**/MiloLib_RoundTrip_TestReport.html' | |
| asset_name: MiloLib_RoundTrip_TestReport.html | |
| asset_content_type: text/html | |
| - name: Upload Release Asset | |
| uses: actions/upload-release-asset@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: MiloEditor.zip | |
| asset_name: MiloEditor.zip | |
| asset_content_type: application/zip |