Update workflows #287
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: .NET | |
| on: | |
| push: | |
| branches: [ develop ] | |
| pull_request: | |
| branches: [ develop ] | |
| jobs: | |
| Tests: | |
| runs-on: windows-latest | |
| env: | |
| Project_Directory: NiL.JS | |
| Solution_Name: $Project_Directory/NiL.JS.csproj | |
| Test_Project_Path: Tests/Tests.csproj | |
| Nuget_Pack_Output_Directory: nuget | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Install .NET Core 10.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 10.0.x | |
| # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Decode the snk | |
| run: | | |
| $snk_byte = [System.Convert]::FromBase64String("${{ secrets.SNK_KEY }}") | |
| $certificatePath = Join-Path -Path $env:Project_Directory -ChildPath keys.snk | |
| [IO.File]::WriteAllBytes("$certificatePath", $snk_byte) | |
| - name: Restore dependencies | |
| run: | | |
| cd ./NiL.JS | |
| dotnet clean | |
| dotnet restore | |
| cd .. | |
| - name: Build | |
| run: | | |
| cd ./NiL.JS | |
| dotnet build --no-restore -c Release -property:SignAssembly=false -property:PublicSign=false | |
| cd .. | |
| - name: Run TinyT4 | |
| run: | | |
| cd Tests | |
| dotnet run --project ..\Utility\tiny-t4\ --framework net10.0 | |
| - name: Test .NET Core 10.0 | |
| run: | | |
| cd Tests | |
| dotnet test -c Release -property:TargetFramework=net10.0 -property:SignAssembly=false -property:PublicSign=false | |
| - name: Test .NET Framework 4.6.1 | |
| run: | | |
| cd Tests | |
| dotnet test -c Release -property:TargetFramework=net461 -property:SignAssembly=false -property:PublicSign=false | |
| - name: Remove the snk | |
| run: Remove-Item -path NiL.JS\keys.snk |