Separated core package and implementation package #1
Workflow file for this run
This file contains hidden or 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: Publish to NuGet | |
| on: | |
| push: | |
| tags: | |
| - core-v[0-9]+.[0-9]+.[0-9]+ | |
| - core-v[0-9]+.[0-9]+.[0-9]+-* | |
| jobs: | |
| BuildAndTest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Build | |
| run: dotnet build -c Release --no-restore | |
| - name: Test | |
| run: dotnet test --no-build --verbosity normal | |
| Publish: | |
| needs: [BuildAndTest] | |
| runs-on: ubuntu-latest | |
| if: (github.ref_type == 'tag') | |
| steps: | |
| - name: Git checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Package project | |
| run: dotnet pack FluentPipelines.Core/FluentPipelines.Core.csproj -c Release "/p:PackageOutputPath=$GITHUB_WORKSPACE/artifacts" "/p:Version=${GITHUB_REF_NAME##core-v}" /p:RepositoryCommit=$GITHUB_SHA "/p:Authors=Visual Vincent" | |
| - name: Publish NuGet package | |
| run: dotnet nuget push "$GITHUB_WORKSPACE/artifacts/*.nupkg" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} |