Update some packages (#63) #91
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: .NET Pipeline | |
# Steps Information: | |
# SplitRepoName - splits the repo name into two parts : name, owner | |
# Setup .NET | |
# Checkout | |
# Build - builds the dlls | |
# Run Unit Tests - Runs the unit tests defined in the project | |
# Publish NuGet (IF BRANCH==MASTER) - will publish new package if version has been manually bumped | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: "8.0.x" # SDK Version to use | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore --configuration Release | |
- name: Run Unit Tests | |
run: dotnet test --no-build --configuration Release --verbosity normal | |
- name: Publish NuGet | |
if: startsWith(github.ref, 'refs/heads/master') && github.repository_owner == 'ErikEJ' | |
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET }} --skip-duplicate |