diff --git a/.github/workflows/ci-otapi3-nuget.yml b/.github/workflows/ci-otapi3-nuget.yml new file mode 100644 index 00000000..791a9dc2 --- /dev/null +++ b/.github/workflows/ci-otapi3-nuget.yml @@ -0,0 +1,28 @@ +name: Deploy NuGet(OTAPI3) + +on: + push: + branches: [ nuget-release ] + +jobs: + build: + + runs-on: ubuntu-latest + environment: release + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.400 + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build TShock.sln --configuration Release --no-restore + - name: Test + run: dotnet test --no-build --verbosity normal --configuration Release + + # Publish to nuget + - name: Push TShockAPI + run: dotnet nuget push TShockAPI/bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json \ No newline at end of file