diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 0000000..c939b24 --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,31 @@ +# This workflow will build a .NET project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net + +name: .NET + +on: + push: + branches: [ "master" ] + +jobs: + publish: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 8.0.x + - name: Pack + working-directory: ./Source/SharpNeedle + run: dotnet pack + - name: Publish + working-directory: ./Source/SharpNeedle + run: dotnet nuget push **/*.nupkg -s $NUGET_SOURCE -k $NUGET_AUTH_TOKEN --skip-duplicate + env: + NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }} + NUGET_SOURCE: https://api.nuget.org/v3/index.json \ No newline at end of file