diff --git a/ChatGPTSharp/.github/workflows/pack.yml b/ChatGPTSharp/.github/workflows/pack.yml
new file mode 100644
index 0000000..4019eee
--- /dev/null
+++ b/ChatGPTSharp/.github/workflows/pack.yml
@@ -0,0 +1,44 @@
+name: Build and Publish NuGet on Tag
+
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+ build-and-publish:
+ runs-on: windows-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: '8.0.*'
+
+ - name: Restore dependencies
+ run: dotnet restore
+
+ - name: Build
+ run: dotnet build --configuration Release --no-restore
+
+ - name: Pack
+ run: dotnet pack --configuration Release --no-build -o nupkgs
+
+ - name: Determine Pre-release Status
+ id: prerelease
+ run: |
+ if [[ ${{ github.ref }} == *"alpha"* ]]; then
+ echo "##[set-output name=status;]true"
+ else
+ echo "##[set-output name=status;]false"
+ fi
+
+ - name: Publish to GitHub Releases
+ uses: softprops/action-gh-release@v1
+ with:
+ files: nupkgs/*.nupkg
+ prerelease: ${{ steps.prerelease.outputs.status }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/ChatGPTSharp/ChatGPTSharp.csproj b/ChatGPTSharp/ChatGPTSharp.csproj
index d723cc6..bcfb093 100644
--- a/ChatGPTSharp/ChatGPTSharp.csproj
+++ b/ChatGPTSharp/ChatGPTSharp.csproj
@@ -4,13 +4,13 @@