From b63e998bc0aafbb5d1185ed09a4b1c45edff9e30 Mon Sep 17 00:00:00 2001 From: John Nye Date: Thu, 4 Jul 2024 16:08:05 +0100 Subject: [PATCH] Create nuget deployment --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..adbfb5f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: Publish SearchExtensions package to NuGet + +on: + push: + branches: + - main + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Go to project directory + run: cd NinjaNye.SearchExtensions + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Test + run: dotnet test --no-restore --verbosity normal + +# - name: Pack +# run: dotnet pack --configuration Release --no-build --output ../../nupkgs +# +# - name: Push to NuGet +# run: dotnet nuget push ../../nupkgs/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate +# if: startsWith(github.ref, 'refs/tags/v')