diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..6ea242b
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,18 @@
+stages:
+ - test
+ - publish
+
+running tests for tag:
+ image: mcr.microsoft.com/dotnet/sdk:5.0
+ stage: test
+ script:
+ - dotnet test tests/EcoLogic.Auth0Api.Tests.csproj
+
+publish to nuget:
+ only:
+ - /^\d*.\d*.\d*$/ # gets triggered if the commit tag is in the form n.n.n where n is any number
+ image: mcr.microsoft.com/dotnet/sdk:5.0
+ stage: publish
+ script:
+ - dotnet pack src/Cli -o ./packaged
+ - dotnet nuget push ./packaged/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json
diff --git a/pack.sh b/pack.sh
new file mode 100755
index 0000000..1195ff1
--- /dev/null
+++ b/pack.sh
@@ -0,0 +1,2 @@
+#!/usr/bin/env bash
+dotnet pack src/Cli -o ../local-nuget-packages
\ No newline at end of file
diff --git a/publish.sh b/publish.sh
new file mode 100755
index 0000000..a1b9cd7
--- /dev/null
+++ b/publish.sh
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+dotnet pack src -o ../../local-nuget-packages
+unset -v latest
+for file in "../local-nuget-packages"/*; do
+ [[ $file -nt $latest ]] && latest=$file
+done
+echo "$latest"
+dotnet nuget push "$latest" -k "$NUGET_API_KEY" -s https://api.nuget.org/v3/index.json
\ No newline at end of file
diff --git a/src/Cli/Cli.csproj b/src/Cli/Cli.csproj
index f1ed9af..ebca526 100644
--- a/src/Cli/Cli.csproj
+++ b/src/Cli/Cli.csproj
@@ -6,19 +6,27 @@