diff --git a/.github/workflows/cli-release.yml b/.github/workflows/cli-release.yml
new file mode 100644
index 0000000..69c27e7
--- /dev/null
+++ b/.github/workflows/cli-release.yml
@@ -0,0 +1,35 @@
+name: Release .NET Tool
+
+on:
+ push:
+ tags:
+ "cli-v[0-9]+.[0-9]+.[0-9]+"
+
+defaults:
+ run:
+ working-directory: src/PwSafeClient.CLI
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Extract Version
+ if: ${{ github.ref_type == 'tag' }}
+ run: |
+ version=$(./build/extract_version "${GITHUB_REF#refs/tags/}")
+ echo "VERSION=$version" >> $GITHUB_ENV
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 8.0.x
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Build
+ run: dotnet build --configuration Release --no-restore /p:Version=$VERSION
+ - name: Pack
+ run: dotnet pack --no-restore --no-build /p:PackageVersion=$VERSION
+ - name: Upload
+ if: github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/cli-v')
+ run: dotnet nuget push nupkg/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
diff --git a/build/extract_version b/build/extract_version
new file mode 100644
index 0000000..09d3cb1
--- /dev/null
+++ b/build/extract_version
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+# Use sed to extract version pattern
+version=$(echo "$1" | sed -E 's/^[^-]+-v?([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?)$/\1/')
+
+echo "$version"
diff --git a/src/PwSafeClient.CLI/PwSafeClient.CLI.csproj b/src/PwSafeClient.CLI/PwSafeClient.CLI.csproj
index 32c8098..54fd532 100644
--- a/src/PwSafeClient.CLI/PwSafeClient.CLI.csproj
+++ b/src/PwSafeClient.CLI/PwSafeClient.CLI.csproj
@@ -3,7 +3,6 @@
net8.0
Exe
pwsafe
- 1.0.0-beta
enable