diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml
deleted file mode 100644
index 454a6f9..0000000
--- a/.github/workflows/package.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-name: Package
-on:
- push:
- branches:
- - main
- paths:
- - 'HttpClient.Cache.nuspec'
-jobs:
- publish:
- name: Publish to NuGet.org
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - uses: nuget/setup-nuget@v1
- with:
- nuget-version: '6.x'
-
- - name: Create the package
- run: nuget pack HttpClient.Cache.nuspec -NoDefaultExcludes
-
- #- name: Publish the package
- # run: nuget push *.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}} -SkipDuplicate
\ No newline at end of file
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 0000000..700e100
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,88 @@
+name: Publish
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - '*'
+ release:
+ types:
+ - published
+
+defaults:
+ run:
+ shell: pwsh
+
+env:
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
+ DOTNET_NOLOGO: true
+ NuGetDirectory: ${{ github.workspace}}/nuget
+
+jobs:
+ create_nuget:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+
+ - run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}
+
+ - uses: actions/upload-artifact@v3
+ with:
+ name: nuget
+ if-no-files-found: error
+ retention-days: 7
+ path: ${{ env.NuGetDirectory }}/*.nupkg
+
+ validate_nuget:
+ runs-on: ubuntu-latest
+ needs: [ create_nuget ]
+ steps:
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+
+ - uses: actions/download-artifact@v3
+ with:
+ name: nuget
+ path: ${{ env.NuGetDirectory }}
+
+ - name: Install nuget validator
+ run: dotnet tool update Meziantou.Framework.NuGetPackageValidation.Tool --global
+
+ - name: Validate package
+ run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")
+
+ run_test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+
+ - name: Run tests
+ run: dotnet test --configuration Release
+
+ deploy:
+ if: github.event_name == 'release'
+ runs-on: ubuntu-latest
+ needs: [ validate_nuget, run_test ]
+ steps:
+ - uses: actions/download-artifact@v3
+ with:
+ name: nuget
+ path: ${{ env.NuGetDirectory }}
+
+ - name: Setup .NET Core
+ uses: actions/setup-dotnet@v3
+
+ - name: Publish NuGet package
+ run: |
+ foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
+ dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
+ }
\ No newline at end of file
diff --git a/HttpClient.Cache.nuspec b/HttpClient.Cache.nuspec
deleted file mode 100644
index 4928009..0000000
--- a/HttpClient.Cache.nuspec
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
- Leefrost.HttpClient.Cache
- 0.0.1
- HttpClient.Cache
- Sergii Lischuk
- Clean Architecture Solution Template for and .NET 6.
-
- This is a solution template for creating a Single Page App (SPA) with ASP.NET Core 6 and Angular 13 following the principles of Clean Architecture.
-
-
- Recreated the Todo page demo that was broken in the Angular 13 upgrade.
-
-
- https://github.com/JasonTaylorDev/CleanArchitecture
-
-
- MIT
- false
- csharp dotnet httpclient cache
- icon.png
- README.md
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/icon.png b/icon.png
new file mode 100644
index 0000000..6916586
Binary files /dev/null and b/icon.png differ
diff --git a/src/HttpClient.Cache/HttpClient.Cache.csproj b/src/HttpClient.Cache/HttpClient.Cache.csproj
index 0c4624a..75477f9 100644
--- a/src/HttpClient.Cache/HttpClient.Cache.csproj
+++ b/src/HttpClient.Cache/HttpClient.Cache.csproj
@@ -6,7 +6,44 @@
enable
+
+ Sergii Lischuk
+ A simple and easy cache for HttpClient
+ https://codestory.me
+ cache, httpclient, library
+
+ True
+ $(NoWarn);CS1591
+ true
+
+
+
+
+
+ MIT
+
+
+
+ README.md
+
+
+
+ icon.png
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+