From 51d04ea06afa966392aeb0dd327705465c0565b7 Mon Sep 17 00:00:00 2001 From: Kwaku Boamah Date: Wed, 25 Oct 2023 13:09:11 +0000 Subject: [PATCH] release --- .github/workflows/release.yml | 18 +++++++++++++++--- src/NQuery.Test/AspNetQueryTest.cs | 2 +- src/NQuery.Test/RedisQueryTest.cs | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 25f43e7..0707e37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,4 @@ -# 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 +# Build and Release NQuery name: .NET @@ -11,9 +10,15 @@ on: jobs: build: - + name: Build runs-on: ubuntu-latest + services: + redis: + image: redis + ports: + - 6379:6379 + steps: - uses: actions/checkout@v3 - name: Setup .NET @@ -26,3 +31,10 @@ jobs: run: dotnet build --no-restore - name: Test run: dotnet test --no-build --verbosity normal + - name: Pack + run: dotnet pack --version-suffix alpha`date +%Y%m%d%H%M%S` -c Release -o ./nugetpkgs --no-build + - name: Publish + run: | + for file in ./nugetpkgs/*.nupkg; do + dotnet nuget push $file --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate --source https://api.nuget.org/v3/index.json + done diff --git a/src/NQuery.Test/AspNetQueryTest.cs b/src/NQuery.Test/AspNetQueryTest.cs index 65fea3b..93027e2 100644 --- a/src/NQuery.Test/AspNetQueryTest.cs +++ b/src/NQuery.Test/AspNetQueryTest.cs @@ -15,7 +15,7 @@ public void Setup() { cfg.UseRedis(opts => { - opts.Endpoints.Add(new RedisEndpoint() { Host = "localhost", Port = 6379 }); + opts.Endpoints.Add(new RedisEndpoint() { Host = "127.0.0.1", Port = 6379 }); }); }); } diff --git a/src/NQuery.Test/RedisQueryTest.cs b/src/NQuery.Test/RedisQueryTest.cs index 50f6385..f46f725 100644 --- a/src/NQuery.Test/RedisQueryTest.cs +++ b/src/NQuery.Test/RedisQueryTest.cs @@ -8,7 +8,7 @@ public class RedisQueryTest CacheDuration = 5, RedisConfiguration = new RedisConfiguration(new[] { - new RedisEndpoint { Host = "localhost", Port = 6379 } + new RedisEndpoint { Host = "127.0.0.1", Port = 6379 } }) }; private NQuery _query;