From 4817eda18cc0120797bebad39dd614b55ebd0a75 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Mon, 4 Mar 2024 19:42:49 +0100 Subject: [PATCH] Create publish-nuget.yml --- .github/workflows/publish-nuget.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/publish-nuget.yml diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml new file mode 100644 index 0000000..8021888 --- /dev/null +++ b/.github/workflows/publish-nuget.yml @@ -0,0 +1,26 @@ +name: Upload nuget package + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' # SDK Version to use. + source-url: https://api.nuget.org/v3/index.json + env: + NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}} + - run: dotnet build --configuration Release src/StoneRed.NetificationApi + - name: Create the package + run: dotnet pack --configuration Release src/StoneRed.NetificationApi + - name: Publish the package to nuget.org + run: dotnet nuget push src/StoneRed.NetificationApi/bin/Release/*.nupkg