diff --git a/.github/workflows/nuget-deploy.yml b/.github/workflows/nuget-deploy.yml new file mode 100644 index 000000000..eb1474b1a --- /dev/null +++ b/.github/workflows/nuget-deploy.yml @@ -0,0 +1,19 @@ +name: Public package to NuGet +on: + push: + branches: [main] +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Pack nuget package + working-directory: ./src/Segment.PublicApi + run: dotnet pack -c Release + - name: Push nuget package + working-directory: ./src/Segment.PublicApi + run: dotnet nuget push bin/Release/Segment.PublicApi.*.nupkg -k ${NUGET_API_KEY} --source https://api.nuget.org/v3/index.json --skip-duplicate + env: + GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}