Update Portalum.Zvt.ControlPanel.csproj #99
This file contains 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: 'CI' | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }}" | |
- uses: actions/checkout@v4 | |
- name: Setup .NET 8.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
working-directory: ./src | |
run: dotnet restore | |
- name: Build | |
working-directory: ./src | |
run: dotnet build --configuration Release --no-restore /p:NoWarn=1591 | |
- name: Test | |
id: test | |
working-directory: ./src | |
run: dotnet test --configuration Release --no-restore --no-build --verbosity normal --logger trx || true | |
- name: Upload Test Report Artifacts | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: test-results | |
path: "**/*.trx" | |
- name: Build project and generate NuGet package | |
run: | | |
dotnet pack --configuration Release --output $GITHUB_WORKSPACE/out src/Portalum.Zvt/Portalum.Zvt.csproj | |
- name: Push NuGet package | |
if: github.event_name != 'pull_request' && github.repository_owner == 'Portalum' && steps.test.outcome == 'success' | |
run: | | |
cd $GITHUB_WORKSPACE/out | |
dotnet nuget push *.nupkg --source https://www.nuget.org/api/v2/package --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate --no-symbols |