diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 669d1a6..f16be04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,36 +18,33 @@ jobs: steps: - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 # To make GitVersion work (installed as dependency in project) - - - name: Setup NuGet - uses: NuGet/setup-nuget@v1.0.5 - - - name: Restore dependencies - run: nuget restore $SOLUTION - name: Setup .NET - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: '6.0.x' include-prerelease: true + - + name: Restore dependencies + run: dotnet restore $SOLUTION - name: Build run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore - name: Run Tests run: dotnet test --no-restore --verbosity normal - - - name: Publish - if: github.event_name != 'pull_request' - run: | - if [ "${{ secrets.NUGET_API_KEY }}" != "" ]; then - echo "Pushing to nuget.org" - nuget push Matterhook.NET.MatterhookClient/bin/Release/*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} - else - echo "Not pushing to nuget.org, no NUGET_API_KEY set in repo secrets" - fi - echo "Pushing to github packages" - nuget push Matterhook.NET.MatterhookClient/bin/Release/*.nupkg -Source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' -ApiKey ${{secrets.GITHUB_TOKEN}} \ No newline at end of file + # - + # name: Publish + # if: github.event_name != 'pull_request' + # run: | + # if [ "${{ secrets.NUGET_API_KEY }}" != "" ]; then + # echo "Pushing to nuget.org" + # dotnet nuget push Matterhook.NET.MatterhookClient/bin/Release/*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} + # else + # echo "Not pushing to nuget.org, no NUGET_API_KEY set in repo secrets" + # fi + # echo "Pushing to github packages" + # dotnet nuget push Matterhook.NET.MatterhookClient/bin/Release/*.nupkg -Source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' -ApiKey ${{secrets.GITHUB_TOKEN}} \ No newline at end of file