Skip to content

feature/minor-refactor-resolver #169

feature/minor-refactor-resolver

feature/minor-refactor-resolver #169

Workflow file for this run

name: .NET
on:
push:
branches: [ main, dev, feature/*, fix/*, release/* ]
pull_request:
branches: [ main ]
release:
types: [ published ]
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
# Create Local NuGet Source
- name: Create Local NuGet Directory
run: mkdir ~/nuget
- name: Add Local Nuget Source
run: dotnet nuget add source ~/nuget
# ServiceProviderExtensions
- name: Restore Dependency.ServiceProviderExtensions
run: dotnet restore ./src/*/*/ServiceProviderExtensions.csproj
- name: Build Dependency.ServiceProviderExtensions
run: dotnet build ./src/*/*/ServiceProviderExtensions.csproj --no-restore -c Release
- name: Pack Dependency.ServiceProviderExtensions
run: dotnet pack ./src/*/*/ServiceProviderExtensions.csproj --no-restore -o ~/nuget -c Release
- name: Restore Dependency.ServiceProviderExtensions.Tests
run: dotnet restore ./src/*/*/ServiceProviderExtensions.Tests.csproj
- name: Test Dependency.ServiceProviderExtensions.Tests
run: dotnet test ./src/*/*/ServiceProviderExtensions.Tests.csproj --no-restore -c Release
# Dependency.Core
- name: Restore Dependency.Core
run: dotnet restore ./src/*/*/Dependency.Core.csproj
- name: Build Dependency.Core
run: dotnet build ./src/*/*/Dependency.Core.csproj --no-restore -c Release
- name: Pack Dependency.Core
run: dotnet pack ./src/*/*/Dependency.Core.csproj --no-restore -o ~/nuget -c Release
- name: Restore Dependency.Core.Tests
run: dotnet restore ./src/*/*/Dependency.Core.Tests.csproj
- name: Test Dependency.Core.Tests
run: dotnet test ./src/*/*/Dependency.Core.Tests.csproj --no-restore -c Release
# Dependency
- name: Restore Dependency
run: dotnet restore ./src/*/*/Dependency.csproj
- name: Build Dependency
run: dotnet build ./src/*/*/Dependency.csproj --no-restore -c Release
- name: Pack Dependency
run: dotnet pack ./src/*/*/Dependency.csproj --no-restore -o ~/nuget -c Release
# Push
- name: Push Packages
if: ${{ github.event_name == 'release' }}
run: >
dotnet nuget push "../../../nuget/*.nupkg"
-s https://api.nuget.org/v3/index.json
-k ${{ secrets.NuGetSourcePassword }}
--skip-duplicate