Skip to content
This repository was archived by the owner on Sep 12, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
# -
# 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}}
Loading