diff --git a/.github/workflows/BUILD_AND_TEST.yml b/.github/workflows/BUILD_AND_TEST.yml
index 7b3a000..1271237 100644
--- a/.github/workflows/BUILD_AND_TEST.yml
+++ b/.github/workflows/BUILD_AND_TEST.yml
@@ -7,7 +7,7 @@ on:
branches: [ develop, main ]
jobs:
- build_test_dstv_net:
+ build_test_rfid_controller:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
diff --git a/.github/workflows/PUBLISH_PACKAGE.yml b/.github/workflows/PUBLISH_PACKAGE.yml
new file mode 100644
index 0000000..653c006
--- /dev/null
+++ b/.github/workflows/PUBLISH_PACKAGE.yml
@@ -0,0 +1,31 @@
+name: Publish Package
+
+on:
+ push:
+ branches: [ main ]
+ paths:
+ - 'SickRfid/SickRfid.csproj'
+ - 'Directory.Build.props'
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ name: Checkout repository
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v3
+ with:
+ dotnet-version: 7.0.x
+ - name: Restore dependencies
+ run: dotnet restore
+ - name: Test
+ run: dotnet test
+ - name: Build
+ run: dotnet build --configuration Release --no-restore
+ - name: Publish SickRfidController to NuGet
+ uses: brandedoutcast/publish-nuget@v2.5.2
+ with:
+ PROJECT_FILE_PATH: SickRfid/SickRfid.csproj
+ NUGET_KEY: ${{secrets.PUBLISH_TO_NUGET_ORG}}
\ No newline at end of file
diff --git a/SickRfid/SickRfid.csproj b/SickRfid/SickRfid.csproj
index b3fdc84..feb5af7 100644
--- a/SickRfid/SickRfid.csproj
+++ b/SickRfid/SickRfid.csproj
@@ -31,5 +31,8 @@
.github\workflows\BUILD_AND_TEST.yml
+
+ .github\workflows\PUBLISH_PACKAGE.yml
+