Publish NuGet Package (net10) #51
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 NuGet Package (net10) | |
| on: | |
| push: | |
| branches: ["master"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up .NET Core | |
| uses: actions/setup-dotnet@v2 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Install dependencies | |
| run: dotnet restore src/Calabonga.UnitOfWork.sln | |
| - name: Build | |
| run: dotnet build src/Calabonga.UnitOfWork.sln --configuration Release --no-restore | |
| - name: Build the NuGet package | |
| run: dotnet pack src/Calabonga.UnitOfWork.sln --configuration Release --output ${{env.DOTNET_ROOT}}\Package | |
| - name: Publish NuGet Package | |
| run: dotnet nuget push ${{env.DOTNET_ROOT}}\Package\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |