Manually publish MZBase.Infrastructure NuGet Package #1
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: Manually publish MZBase.Infrastructure NuGet Package | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v1 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore MZBase.Infrastructure/MZBase.Infrastructure.csproj | |
| - name: Build | |
| run: dotnet build --configuration Release MZBase.Infrastructure/MZBase.Infrastructure.csproj | |
| - name: Pack | |
| run: dotnet pack --configuration Release --output ./nupkg MZBase.Infrastructure/MZBase.Infrastructure.csproj | |
| - name: Publish NuGet package | |
| env: | |
| NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
| run: dotnet nuget push **/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate |