Merge pull request #219 from PapstIO/bugfix/remove-packagelicenseurl #15
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: Build and Publish Papst.EventStore | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core SDK | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: '8.x' | |
- name: Setup Nerdbank.GitVersioning | |
run: dotnet tool install -g nbgv | |
- name: Use Nerdbank.GitVersioning to get version | |
run: nbgv get-version | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build solution | |
run: dotnet build --no-restore --configuration Release | |
- name: Run tests | |
run: dotnet test --no-build --verbosity normal --configuration Release | |
- name: Pack Papst.EventStore project | |
run: dotnet pack src/Papst.EventStore/Papst.EventStore.csproj --no-build --configuration Release --output ./artifacts | |
- name: Pack Papst.EventStore project | |
run: dotnet pack src/Papst.EventStore.Aggregation.EventRegistration/Papst.EventStore.Aggregation.EventRegistration.csproj --no-build --configuration Release --output ./artifacts | |
- name: Pack Papst.EventStore project | |
run: dotnet pack src/Papst.EventStore.CodeGeneration/Papst.EventStore.CodeGeneration.csproj --no-build --configuration Release --output ./artifacts | |
- name: Pack Papst.EventStore project | |
run: dotnet pack src/Papst.EventStore.AzureCosmos/Papst.EventStore.AzureCosmos.csproj --no-build --configuration Release --output ./artifacts | |
- name: Pack Papst.EventStore project | |
run: dotnet pack src/Papst.EventStore.EntityFrameworkCore/Papst.EventStore.EntityFrameworkCore.csproj --no-build --configuration Release --output ./artifacts | |
- name: Pack Papst.EventStore project | |
run: dotnet pack src/Papst.EventStore.FileSystem/Papst.EventStore.FileSystem.csproj --no-build --configuration Release --output ./artifacts | |
- name: Publish to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_APIKEY }} | |
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} |