diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index c18006fb..cec31758 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -44,3 +44,21 @@ jobs: run: dotnet test - name: stop weaviate run: /bin/bash ci/stop_weaviate.sh ${{ env.WEAVIATE }} + + build-and-publish: + name: Build and publish to Nuget + needs: [integration-tests] + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup dotnet 8 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.x' + - name: Install dependencies and build + run: dotnet pack -c Release -o out src/Weaviate.Client/ + - name: Push generated package to GitHub registry + run: dotnet nuget push ./out/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_APIKEY }} --source https://api.nuget.org/v3/index.json \ No newline at end of file