diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..cc4d38c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,3 @@
+* text=auto
+*.cs text
+*.csproj text
diff --git a/.github/workflows/Harp.CameraControllerGen2.yml b/.github/workflows/Harp.CameraControllerGen2.yml
new file mode 100644
index 0000000..215665e
--- /dev/null
+++ b/.github/workflows/Harp.CameraControllerGen2.yml
@@ -0,0 +1,103 @@
+name: Harp.CameraControllerGen2
+on:
+ push:
+ # This prevents tag pushes from triggering this workflow
+ branches: ['**']
+ pull_request:
+ release:
+ types: [published]
+ workflow_dispatch:
+env:
+ DOTNET_NOLOGO: true
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
+ DOTNET_GENERATE_ASPNET_CERTIFICATE: false
+ ContinuousIntegrationBuild: true
+ CiBuildVersion: ${{github.event.release.tag_name || 'api42.42.42'}}
+jobs:
+ build:
+ strategy:
+ fail-fast: false
+ matrix:
+ configuration: ['Release']
+ include:
+ - configuration: Release
+ collect-packages: true
+ name: Build
+ runs-on: windows-latest
+ if: github.event_name != 'release' || startsWith(github.event.release.tag_name, 'api')
+ steps:
+ # ----------------------------------------------------------------------- Checkout
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ # ----------------------------------------------------------------------- Set up tools
+ - name: Set up .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.x
+
+ - name: Set up T4
+ run: dotnet tool install -g dotnet-t4 --version 3.0.0
+
+ # ----------------------------------------------------------------------- Regenerate
+ - name: Restore generators
+ run: dotnet restore Generators
+
+ - name: Run generators
+ run: dotnet build Generators --no-restore --configuration ${{matrix.configuration}}
+
+ - name: Verify pre-generated code was up-to-date
+ id: verify-dist
+ run: |
+ git add . --intent-to-add --ignore-removal
+ git diff --name-status --exit-code
+
+ # ----------------------------------------------------------------------- Build interface package
+ - name: Restore interface
+ run: dotnet restore Interface
+
+ - name: Build interface
+ run: dotnet build Interface --no-restore --configuration ${{matrix.configuration}}
+
+ - name: Pack interface
+ id: pack
+ run: dotnet pack Interface --no-restore --no-build --configuration ${{matrix.configuration}}
+
+ # ----------------------------------------------------------------------- Collect artifacts
+ - name: Collect NuGet packages
+ uses: actions/upload-artifact@v4
+ if: matrix.collect-packages && steps.pack.outcome == 'success' && always()
+ with:
+ name: Packages
+ if-no-files-found: error
+ path: Interface/bin/${{matrix.configuration}}/**
+
+ publish-packages-nuget-org:
+ name: Publish packages to NuGet.org
+ runs-on: ubuntu-latest
+ permissions:
+ # Needed to attach files to releases
+ contents: write
+ environment: public-release
+ needs: build
+ if: github.event_name == 'release'
+ steps:
+ # ----------------------------------------------------------------------- Set up .NET
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.x
+
+ # ----------------------------------------------------------------------- Download built packages
+ - name: Download built packages
+ uses: actions/download-artifact@v4
+ with:
+ name: Packages
+ path: artifacts/packages/
+
+ # ----------------------------------------------------------------------- Push to NuGet.org
+ - name: Push to NuGet.org
+ run: dotnet nuget push "artifacts/packages/*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source ${{vars.NUGET_API_URL}}
+ env:
+ # This is a workaround for https://github.com/NuGet/Home/issues/9775
+ DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER: 0
diff --git a/Interface/Directory.Build.props b/Interface/Directory.Build.props
new file mode 100644
index 0000000..1392799
--- /dev/null
+++ b/Interface/Directory.Build.props
@@ -0,0 +1,15 @@
+
+
+
+ $(WarningsAsErrors);CS7035
+ $(NoWarn);CS1591
+
+
+ $(CiBuildVersion.Substring(3))
+ true
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Interface/Harp.CameraControllerGen2/Harp.CameraControllerGen2.csproj b/Interface/Harp.CameraControllerGen2/Harp.CameraControllerGen2.csproj
index c231cd2..4b14fc6 100644
--- a/Interface/Harp.CameraControllerGen2/Harp.CameraControllerGen2.csproj
+++ b/Interface/Harp.CameraControllerGen2/Harp.CameraControllerGen2.csproj
@@ -9,6 +9,7 @@
true
Bonsai Library containing interfaces for data acquisition and control of Harp CameraController Gen2 devices.
true
+ Dependency;BonsaiLibrary
Harp CameraController Gen2 Bonsai Rx
https://harp-tech.org
https://github.com/harp-tech/device.cameracontrollergen2.git