Merge pull request #35 from pfpack/release/v2.0.3 #94
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 | |
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 | |
# Primitives.Linq | |
- name: Restore Primitives.Linq | |
run: dotnet restore ./src/*/*/Primitives.Linq.csproj | |
- name: Build Primitives.Linq | |
run: dotnet build ./src/*/*/Primitives.Linq.csproj --no-restore -c Release | |
- name: Pack Primitives.Linq | |
run: dotnet pack ./src/*/*/Primitives.Linq.csproj --no-restore -o ~/nuget -c Release | |
- name: Restore Primitives.Linq.Tests | |
run: dotnet restore ./src/*/*/Primitives.Linq.Tests.csproj | |
- name: Test Primitives.Linq.Tests | |
run: dotnet test ./src/*/*/Primitives.Linq.Tests.csproj --no-restore -c Release | |
# Primitives.Pipeline | |
- name: Restore Primitives.Pipeline | |
run: dotnet restore ./src/*/*/Primitives.Pipeline.csproj | |
- name: Build Primitives.Pipeline | |
run: dotnet build ./src/*/*/Primitives.Pipeline.csproj --no-restore -c Release | |
- name: Pack Primitives.Pipeline | |
run: dotnet pack ./src/*/*/Primitives.Pipeline.csproj --no-restore -o ~/nuget -c Release | |
- name: Restore Primitives.Pipeline.Tests | |
run: dotnet restore ./src/*/*/Primitives.Pipeline.Tests.csproj | |
- name: Test Primitives.Pipeline.Tests | |
run: dotnet test ./src/*/*/Primitives.Pipeline.Tests.csproj --no-restore -c Release | |
# Primitives.Predicates | |
- name: Restore Primitives.Predicates | |
run: dotnet restore ./src/*/*/Primitives.Predicates.csproj | |
- name: Build Primitives.Predicates | |
run: dotnet build ./src/*/*/Primitives.Predicates.csproj --no-restore -c Release | |
- name: Pack Primitives.Predicates | |
run: dotnet pack ./src/*/*/Primitives.Predicates.csproj --no-restore -o ~/nuget -c Release | |
- name: Restore Primitives.Predicates.Tests | |
run: dotnet restore ./src/*/*/Primitives.Predicates.Tests.csproj | |
- name: Test Primitives.Predicates.Tests | |
run: dotnet test ./src/*/*/Primitives.Predicates.Tests.csproj --no-restore -c Release | |
# Primitives.Strings | |
- name: Restore Primitives.Strings | |
run: dotnet restore ./src/*/*/Primitives.Strings.csproj | |
- name: Build Primitives.Strings | |
run: dotnet build ./src/*/*/Primitives.Strings.csproj --no-restore -c Release | |
- name: Pack Primitives.Strings | |
run: dotnet pack ./src/*/*/Primitives.Strings.csproj --no-restore -o ~/nuget -c Release | |
- name: Restore Primitives.Strings.Tests | |
run: dotnet restore ./src/*/*/Primitives.Strings.Tests.csproj | |
- name: Test Primitives.Strings.Tests | |
run: dotnet test ./src/*/*/Primitives.Strings.Tests.csproj --no-restore -c Release | |
# Primitives | |
- name: Restore Primitives | |
run: dotnet restore ./src/*/*/Primitives.csproj | |
- name: Build Primitives | |
run: dotnet build ./src/*/*/Primitives.csproj --no-restore -c Release | |
- name: Pack Primitives | |
run: dotnet pack ./src/*/*/Primitives.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 |