Upgrade .NET Core version from 9.0.x to 10.0.x #49
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 and Publish | |
| on: | |
| push: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| env: | |
| Solution_Name: "WinFormedge.sln" | |
| steps: | |
| - name: Checkout repository | |
| id: checkout_repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "10.0.x" | |
| - name: Get .NET information | |
| run: dotnet --info | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Clean .NET cache | |
| id: clean_dotnet_cache | |
| shell: pwsh | |
| run: | | |
| dotnet clean $env:Solution_Name | |
| dotnet nuget locals all --clear | |
| - name: Install NuGet packages | |
| id: install_nuget_packages | |
| shell: pwsh | |
| run: | | |
| nuget restore $env:Solution_Name | |
| - name: Build solution | |
| id: build_solution | |
| shell: pwsh | |
| run: | | |
| msbuild $env:Solution_Name -property:Configuration=Release | |
| - name: Install Nuget | |
| run: | | |
| $sourceNugetExe = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" | |
| $targetNugetExe = "nuget.exe" | |
| Invoke-WebRequest $sourceNugetExe -OutFile $targetNugetExe | |
| - name: Push Nuget package | |
| run: | | |
| .\nuget.exe push .\bin\*.nupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_KEY }} -NoSymbols -SkipDuplicate | |
| .\nuget.exe push .\bin\*.snupkg -Source https://api.nuget.org/v3/index.json -ApiKey ${{ secrets.NUGET_KEY }} -SkipDuplicate |