From ddbf52d10735974184bebdaaa6578373fa6bcd83 Mon Sep 17 00:00:00 2001 From: "George Njeri (Swagfin)" Date: Mon, 1 Apr 2024 19:05:14 +0300 Subject: [PATCH] Create release-nuget-pkg.yml --- .github/workflows/release-nuget-pkg.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/release-nuget-pkg.yml diff --git a/.github/workflows/release-nuget-pkg.yml b/.github/workflows/release-nuget-pkg.yml new file mode 100644 index 0000000..8721b1a --- /dev/null +++ b/.github/workflows/release-nuget-pkg.yml @@ -0,0 +1,22 @@ +name: Release FileDB.Core to NuGet +on: + release: + types: [published] + +jobs: + publish_nuget_package: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v1 + - name: Build + run: dotnet build FileDB.Core/FileDB.Core.csproj -c Release + - name: Test + run: dotnet test FileDB.Core/FileDB.Core.csproj -c Release --no-build + - name: Pack nugets + run: dotnet pack FileDB.Core/FileDB.Core.csproj -c Release --no-build --output . + - name: Push to NuGet + run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json