From 296fc56b6f65c54b8412d71d3a2f1836c7571d39 Mon Sep 17 00:00:00 2001 From: Forest Date: Thu, 29 Feb 2024 12:33:51 -0800 Subject: [PATCH] Add nuget yaml --- .github/workflows/nuget.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/nuget.yml diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 0000000..ac9a3db --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,28 @@ +name: Publish to Nuget + +on: + workflow_dispatch: + inputs: + version: + required: true + type: string + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ windows-latest ] + + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 7.x + env: + nuget_api_key: ${{ secrets.NUGET_API_KEY }} + - name: Pack + run: dotnet pack /p:Version=${{ inputs.version }} --output . + - name: Push + run: dotnet nuget push innersloth.Hazel-Networking.${{ inputs.version }}.nupkg --source https://api.nuget.org/v3/index.json --api-key "$nuget_api_key"