From cb0ff87987f7bf351199e27230ef89e70e9eb1db Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 21:26:51 +0200 Subject: [PATCH 01/13] Add workflow for building and publishing NuGet package --- .github/workflows/publish-nuget.yaml | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/publish-nuget.yaml diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml new file mode 100644 index 0000000..5f87fdc --- /dev/null +++ b/.github/workflows/publish-nuget.yaml @@ -0,0 +1,43 @@ +name: Build & Publish NuGet Package + +on: + push: + branches: + - master + tags: + - 'v*.*.*' + release: + types: [created] + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v6 + + - name: Set up .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: '10.0.x' + cache: true + + - name: Restore dependencies + run: dotnet restore + + - name: Build the project + run: dotnet build --configuration Release --no-restore + + - name: Pack the project + run: dotnet pack --configuration Release --no-build -o ./nupkg + + - name: Upload package as artifact + uses: actions/upload-artifact@v7 + with: + name: nuget-package + path: ./nupkg/*.nupkg + + - name: Push package to NuGet + if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v') + run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate \ No newline at end of file From 5c44c2db615cb26e9b7b506773484ce5eaebc85c Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 21:27:17 +0200 Subject: [PATCH 02/13] Add temp trigger to test from feature branch --- .github/workflows/publish-nuget.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index 5f87fdc..b205a8f 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + - feature/add-release-pipeline tags: - 'v*.*.*' release: From 91ca53b112228fb383a40c7a5054d9ab7c961bb9 Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 21:30:22 +0200 Subject: [PATCH 03/13] Checkout submodules recursively and clone with tags --- .github/workflows/publish-nuget.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index b205a8f..45967e3 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -17,6 +17,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v6 + with: + fetch-depth: 0 + submodules: 'recursive' - name: Set up .NET uses: actions/setup-dotnet@v5 From 9a84958c0d0784370388c0571605f8ec575dc561 Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 21:43:18 +0200 Subject: [PATCH 04/13] Add .gitmodules with submodule path --- .gitmodules | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..16f8cfb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "EasyUtils"] + path = EasyUtils + url = https://github.com/BOLL7708/EasyUtils.git \ No newline at end of file From 12bff72ecc980e42c892e43ee8c69c6444154ecf Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 21:46:42 +0200 Subject: [PATCH 05/13] Remove dotnet caching --- .github/workflows/publish-nuget.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index 45967e3..21b5dcb 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -25,7 +25,6 @@ jobs: uses: actions/setup-dotnet@v5 with: dotnet-version: '10.0.x' - cache: true - name: Restore dependencies run: dotnet restore From 3549623cbb24f39d5530afe04b920b4d4d8a4504 Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 21:56:17 +0200 Subject: [PATCH 06/13] Add task to download openvr dependencies --- .github/workflows/publish-nuget.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index 21b5dcb..cbf6007 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -26,6 +26,33 @@ jobs: with: dotnet-version: '10.0.x' + - name: Download OpenVR Dependencies + run: | + echo "------------------------------------------------------------------" + echo " Will download latest versions of OpenVR dependencies from Github" + echo "------------------------------------------------------------------" + + echo "Downloading: openvr_api.cs" + curl -L -o openvr_api.cs https://raw.githubusercontent.com/ValveSoftware/openvr/master/headers/openvr_api.cs + + echo "Downloading: openvr_api.dll" + curl -L -o openvr_api.dll https://github.com/ValveSoftware/openvr/raw/master/bin/win64/openvr_api.dll + + echo "Downloading: openvr_api.dll.sig" + curl -L -o openvr_api.dll.sig https://github.com/ValveSoftware/openvr/raw/master/bin/win64/openvr_api.dll.sig + + echo "Downloading: openvr_api.pdb" + curl -L -o openvr_api.pdb https://github.com/ValveSoftware/openvr/raw/master/bin/win64/openvr_api.pdb + + echo "Downloading: libopenvr_api.so" + curl -L -o libopenvr_api.so https://github.com/ValveSoftware/openvr/raw/master/bin/linux64/libopenvr_api.so + + echo "Downloading: libopenvr_api.so.dbg" + curl -L -o libopenvr_api.so.dbg https://github.com/ValveSoftware/openvr/raw/master/bin/linux64/libopenvr_api.so.dbg + + echo "------------------------------------------------------------------" + echo "Done!" + - name: Restore dependencies run: dotnet restore From dceea92197743bb2825f2749654af314b640401d Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 22:01:17 +0200 Subject: [PATCH 07/13] Remove unneeded openvr files They are needed for runtime only --- .github/workflows/publish-nuget.yaml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index cbf6007..4c35138 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -28,31 +28,8 @@ jobs: - name: Download OpenVR Dependencies run: | - echo "------------------------------------------------------------------" - echo " Will download latest versions of OpenVR dependencies from Github" - echo "------------------------------------------------------------------" - - echo "Downloading: openvr_api.cs" curl -L -o openvr_api.cs https://raw.githubusercontent.com/ValveSoftware/openvr/master/headers/openvr_api.cs - echo "Downloading: openvr_api.dll" - curl -L -o openvr_api.dll https://github.com/ValveSoftware/openvr/raw/master/bin/win64/openvr_api.dll - - echo "Downloading: openvr_api.dll.sig" - curl -L -o openvr_api.dll.sig https://github.com/ValveSoftware/openvr/raw/master/bin/win64/openvr_api.dll.sig - - echo "Downloading: openvr_api.pdb" - curl -L -o openvr_api.pdb https://github.com/ValveSoftware/openvr/raw/master/bin/win64/openvr_api.pdb - - echo "Downloading: libopenvr_api.so" - curl -L -o libopenvr_api.so https://github.com/ValveSoftware/openvr/raw/master/bin/linux64/libopenvr_api.so - - echo "Downloading: libopenvr_api.so.dbg" - curl -L -o libopenvr_api.so.dbg https://github.com/ValveSoftware/openvr/raw/master/bin/linux64/libopenvr_api.so.dbg - - echo "------------------------------------------------------------------" - echo "Done!" - - name: Restore dependencies run: dotnet restore From 1782a9d79e78eedd883d8ca5b34a34c1e30bdfce Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 22:06:23 +0200 Subject: [PATCH 08/13] Update NuGet publish workflow to streamline release process --- .github/workflows/publish-nuget.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index 4c35138..2d44507 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -4,12 +4,12 @@ on: push: branches: - master - - feature/add-release-pipeline - tags: - - 'v*.*.*' release: types: [created] +permissions: + contents: write + jobs: build-and-publish: runs-on: ubuntu-latest @@ -45,6 +45,12 @@ jobs: name: nuget-package path: ./nupkg/*.nupkg + - name: Upload package to release + if: github.event_name == 'release' + run: gh release upload ${{ github.event.release.tag_name }} ./nupkg/*.nupkg + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Push package to NuGet - if: github.event_name == 'release' || startsWith(github.ref, 'refs/tags/v') + if: github.event_name == 'release' run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate \ No newline at end of file From d2e1f53a8d93c9476faf3e13753a6c0db96004b9 Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 22:19:26 +0200 Subject: [PATCH 09/13] Enhance NuGet publish workflow to support versioning and GitHub Packages --- .github/workflows/publish-nuget.yaml | 31 +++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index 2d44507..85df184 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -9,6 +9,7 @@ on: permissions: contents: write + packages: write jobs: build-and-publish: @@ -36,8 +37,25 @@ jobs: - name: Build the project run: dotnet build --configuration Release --no-restore + - name: Determine version + id: version + run: | + if [ "${{ github.event_name }}" == "release" ]; then + VERSION="${{ github.event.release.tag_name }}" + VERSION="${VERSION#v}" + else + LATEST_TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") + BASE_VERSION="${LATEST_TAG#v}" + MAJOR=$(echo $BASE_VERSION | cut -d. -f1) + MINOR=$(echo $BASE_VERSION | cut -d. -f2) + PATCH=$(echo $BASE_VERSION | cut -d. -f3) + NEXT_PATCH=$((PATCH + 1)) + VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}-preview.${{ github.run_number }}" + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT + - name: Pack the project - run: dotnet pack --configuration Release --no-build -o ./nupkg + run: dotnet pack --configuration Release --no-build -o ./nupkg -p:Version=${{ steps.version.outputs.version }} - name: Upload package as artifact uses: actions/upload-artifact@v7 @@ -51,6 +69,17 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Push package to GitHub Packages + if: github.event_name == 'push' + run: | + dotnet nuget add source \ + --username ${{ github.actor }} \ + --password ${{ secrets.GITHUB_TOKEN }} \ + --store-password-in-clear-text \ + --name github \ + "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" + dotnet nuget push ./nupkg/*.nupkg --source github --skip-duplicate + - name: Push package to NuGet if: github.event_name == 'release' run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate \ No newline at end of file From 932f47fe247ad73566920c22187cd48eefb6732a Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 22:29:29 +0200 Subject: [PATCH 10/13] Add package metadata and update project file structure --- EasyOpenVR.csproj | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/EasyOpenVR.csproj b/EasyOpenVR.csproj index 5932b67..c0d21d3 100644 --- a/EasyOpenVR.csproj +++ b/EasyOpenVR.csproj @@ -5,6 +5,16 @@ disable enable 14 + + EasyOpenVR + BOLL7708 + This is a Class Library to make it easier to talk to the OpenVR API using the official C# headers + openvr steamvr openvr-api + https://github.com/BOLL7708/EasyOpenVR + https://github.com/BOLL7708/EasyOpenVR + git + LICENSE.md + README.md @@ -18,4 +28,9 @@ + + + + + From f61b23283e33f8bdb8633c39024098cdbd304b7e Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 22:33:03 +0200 Subject: [PATCH 11/13] Refactor NuGet publish workflow to ensure API key is set correctly and adjust conditions for package pushing --- .github/workflows/publish-nuget.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index 85df184..ca688b2 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -14,6 +14,8 @@ permissions: jobs: build-and-publish: runs-on: ubuntu-latest + env: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} steps: - name: Checkout code @@ -70,7 +72,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Push package to GitHub Packages - if: github.event_name == 'push' run: | dotnet nuget add source \ --username ${{ github.actor }} \ @@ -81,5 +82,5 @@ jobs: dotnet nuget push ./nupkg/*.nupkg --source github --skip-duplicate - name: Push package to NuGet - if: github.event_name == 'release' - run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate \ No newline at end of file + if: github.event_name == 'release' && env.NUGET_API_KEY != '' + run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ env.NUGET_API_KEY }} --skip-duplicate \ No newline at end of file From 5bb5e68ac5708e95915ddfe6dd4c8e5e17d53676 Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 22:41:20 +0200 Subject: [PATCH 12/13] Enhance NuGet publish workflow with artifact upload and job summary reporting --- .github/workflows/publish-nuget.yaml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index ca688b2..645d4ff 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -60,18 +60,21 @@ jobs: run: dotnet pack --configuration Release --no-build -o ./nupkg -p:Version=${{ steps.version.outputs.version }} - name: Upload package as artifact + id: upload-artifact uses: actions/upload-artifact@v7 with: name: nuget-package path: ./nupkg/*.nupkg - name: Upload package to release + id: upload-release if: github.event_name == 'release' run: gh release upload ${{ github.event.release.tag_name }} ./nupkg/*.nupkg env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Push package to GitHub Packages + id: push-github run: | dotnet nuget add source \ --username ${{ github.actor }} \ @@ -82,5 +85,28 @@ jobs: dotnet nuget push ./nupkg/*.nupkg --source github --skip-duplicate - name: Push package to NuGet + id: push-nuget if: github.event_name == 'release' && env.NUGET_API_KEY != '' - run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ env.NUGET_API_KEY }} --skip-duplicate \ No newline at end of file + run: dotnet nuget push ./nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ env.NUGET_API_KEY }} --skip-duplicate + + - name: Job summary + if: always() + run: | + echo "## NuGet Package" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "**Version:** \`${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### Links" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + if [ "${{ steps.upload-artifact.outcome }}" == "success" ]; then + echo "- [Artifact (this run)](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY + fi + if [ "${{ steps.push-github.outcome }}" == "success" ]; then + echo "- [GitHub Packages](https://github.com/${{ github.repository }}/pkgs/nuget/EasyOpenVR)" >> $GITHUB_STEP_SUMMARY + fi + if [ "${{ steps.upload-release.outcome }}" == "success" ]; then + echo "- [GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${{ github.event.release.tag_name }})" >> $GITHUB_STEP_SUMMARY + fi + if [ "${{ steps.push-nuget.outcome }}" == "success" ]; then + echo "- [NuGet.org](https://www.nuget.org/packages/EasyOpenVR/${{ steps.version.outputs.version }})" >> $GITHUB_STEP_SUMMARY + fi From 95907d8540fb63408eefe02e569d799856dcd879 Mon Sep 17 00:00:00 2001 From: Jeppe Beier Date: Thu, 23 Apr 2026 22:43:27 +0200 Subject: [PATCH 13/13] Fix artifact link in job summary for better navigation --- .github/workflows/publish-nuget.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-nuget.yaml b/.github/workflows/publish-nuget.yaml index 645d4ff..734d1d4 100644 --- a/.github/workflows/publish-nuget.yaml +++ b/.github/workflows/publish-nuget.yaml @@ -99,7 +99,7 @@ jobs: echo "### Links" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY if [ "${{ steps.upload-artifact.outcome }}" == "success" ]; then - echo "- [Artifact (this run)](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})" >> $GITHUB_STEP_SUMMARY + echo "- [Artifact (this run)](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts)" >> $GITHUB_STEP_SUMMARY fi if [ "${{ steps.push-github.outcome }}" == "success" ]; then echo "- [GitHub Packages](https://github.com/${{ github.repository }}/pkgs/nuget/EasyOpenVR)" >> $GITHUB_STEP_SUMMARY