From e1c4c71a87b6eb7eefd2b5e495490fb90f475a41 Mon Sep 17 00:00:00 2001 From: plyshka Date: Fri, 31 Mar 2023 23:19:01 +0500 Subject: [PATCH] Updated project to utilise CI (from ProjectBabble mod) --- .github/workflows/build.yml | 43 +++++++++++++ Directory.Build.props | 60 ++++++++----------- .../EyeTrackVR-Neos.Tests.csproj | 1 - EyeTrackVR-Neos.csproj | 4 ++ EyeTrackVR-Neos/EyeTrackVR-Neos.csproj | 9 +-- 5 files changed, 75 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e8303d4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Autobuild +on: [push, pull_request] + +env: + NeosPath: "${{ github.workspace }}/neos_install/" +permissions: + contents: write +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout NML + uses: actions/checkout@v3 + - name: setup build environment + uses: neos-modding-group/neos-plugin-setup-action@master + - name: get NeosModLoader.dll + uses: dsaltares/fetch-gh-release-asset@1.0.0 + with: + repo: neos-modding-group/NeosModLoader + file: NeosModLoader.dll + - name: lint + run: dotnet format --verbosity detailed --verify-no-changes ./EyeTrackVR-Neos.csproj + - name: build + run: dotnet build ./EyeTrackVR-Neos.csproj --configuration Release "-property:CopyToMods=false" + - name: upload workflow artifacts + uses: actions/upload-artifact@v3 + with: + name: EyeTrackVR-Neos + path: | + ./EyeTrackVR-Neos/bin/Release/net462/Rug.Osc.dll + ./EyeTrackVR-Neos/bin/Release/net462/EyeTrackVR-Neos.dll + if-no-files-found: error + retention-days: 5 + - name: upload release artifacts + if: startsWith(github.ref, 'refs/tags/') # only publish release artifacts for pushes to tags + uses: softprops/action-gh-release@v1 + with: + draft: true # if creating a new release, make it a draft + files: | + ./EyeTrackVR-Neos/bin/Release/net462/EyeTrackVR-Neos.dll + ./EyeTrackVR-Neos/bin/Release/net462/Rug.Osc.dll + fail_on_unmatched_files: true + diff --git a/Directory.Build.props b/Directory.Build.props index 58d51e1..c5a2f5a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,61 +1,53 @@ - net472 + Library + Properties + false + net462 + 512 9 - ..\bin - false + enable true false true - $(MSBuildThisFileDirectory)NeosVR - C:\Program Files (x86)\Steam\steamapps\common\NeosVR\ - $(HOME)/.steam/steam/steamapps/common/NeosVR/ - /home/plyshka/Games/SteamLibrary/steamapps/common/NeosVR/ - $(NeosPath)Neos_Data\Managed\ - false - false false None + + $(MSBuildThisFileDirectory)NeosVR/ + /home/plyshka/Games/SteamLibrary/steamapps/common/NeosVR/ + C:\Program Files (x86)\Steam\steamapps\common\NeosVR\ + $(HOME)/.steam/steam/steamapps/common/NeosVR/ + + - - $(NeosPath)Libraries\NeosModLoader.dll - $(NeosPath)NeosModLoader.dll - - - $(NeosPath)nml_libs\0Harmony.dll - $(NeosPath)0Harmony.dll + + + $(NeosPath)Neos_Data\Managed\FrooxEngine.dll - $(GameRefsPath)BaseX.dll - False + $(NeosPath)Neos_Data\Managed\BaseX.dll - $(GameRefsPath)CodeX.dll + $(NeosPath)Neos_Data\Managed\CodeX.dll - $(GameRefsPath)Assembly-CSharp.dll - - - $(GameRefsPath)FrooxEngine.dll + $(NeosPath)Neos_Data\Managed\Assembly-CSharp.dll - $(GameRefsPath)UnityEngine.dll + $(NeosPath)Neos_Data\Managed\UnityEngine.dll - $(GameRefsPath)UnityEngine.CoreModule.dll + $(NeosPath)Neos_Data\Managed\UnityEngine.CoreModule.dll + + + $(NeosPath)Libraries\NeosModLoader.dll + $(NeosPath)NeosModLoader.dll + $(MSBuildProjectDirectory)\..\NeosModLoader.dll - - - - - - - - diff --git a/EyeTrackVR-Neos.Tests/EyeTrackVR-Neos.Tests.csproj b/EyeTrackVR-Neos.Tests/EyeTrackVR-Neos.Tests.csproj index cc927f4..6bd0758 100644 --- a/EyeTrackVR-Neos.Tests/EyeTrackVR-Neos.Tests.csproj +++ b/EyeTrackVR-Neos.Tests/EyeTrackVR-Neos.Tests.csproj @@ -7,5 +7,4 @@ $(NeosPath)Rug.Osc.dll - exe \ No newline at end of file diff --git a/EyeTrackVR-Neos.csproj b/EyeTrackVR-Neos.csproj index 3d09a94..641e19b 100644 --- a/EyeTrackVR-Neos.csproj +++ b/EyeTrackVR-Neos.csproj @@ -9,6 +9,10 @@ + + + + diff --git a/EyeTrackVR-Neos/EyeTrackVR-Neos.csproj b/EyeTrackVR-Neos/EyeTrackVR-Neos.csproj index 6bd0758..70ef416 100644 --- a/EyeTrackVR-Neos/EyeTrackVR-Neos.csproj +++ b/EyeTrackVR-Neos/EyeTrackVR-Neos.csproj @@ -1,10 +1,5 @@ - - $(GameRefsPath)Unity.InputSystem.dll - - - $(NeosPath)Rug.Osc.dll - + - \ No newline at end of file +