Skip to content

Commit

Permalink
Try to pack also for prs
Browse files Browse the repository at this point in the history
  • Loading branch information
martinothamar committed Apr 3, 2024
1 parent 229686f commit 728a70d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ jobs:

publish:
needs: build
if: ${{ !github.base_ref }}
runs-on: ubuntu-latest

env:
Expand Down Expand Up @@ -88,11 +87,14 @@ jobs:
- name: Build
run: dotnet build --no-restore -c Release

- name: Test
run: dotnet test --no-restore --no-build -c Release --logger "console;verbosity=detailed"

- name: Pack
run: |
dotnet pack src/Mediator/Mediator.csproj --no-restore --no-build --verbosity normal -c Release -o artifacts/ && \
dotnet pack src/Mediator.SourceGenerator/Mediator.SourceGenerator.csproj --no-restore --no-build --verbosity normal -c Release -o artifacts/
- name: Push to NuGet
if: ${{ success() }}
run: dotnet nuget push artifacts/**.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}}
if: ${{ success() && github.event_name != 'pull_request' }}
run: dotnet nuget push artifacts/**.nupkg -s https://api.nuget.org/v3/index.json # --api-key ${{secrets.NUGET_API_KEY}}

0 comments on commit 728a70d

Please sign in to comment.