-
Notifications
You must be signed in to change notification settings - Fork 1
CI を統合して .NET 10 に更新 #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
4a6a1ec
fe8d9a8
989f110
a5655ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| name: ci | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| tags: | ||
| - "v*" | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| RESONITE_INSTALL_DIR: ${{ github.workspace }}/Resonite | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup .NET 10 | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: 10.0.x | ||
|
|
||
| - name: Verify tag matches project version | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| version=$(grep -o '<Version>[^<]*</Version>' Directory.Build.props | sed -e 's/<Version>//' -e 's/<\/Version>//') | ||
| test "v${version}" = "${{ github.ref_name }}" | ||
|
|
||
| - name: Prepare fallback references | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p "${RESONITE_INSTALL_DIR}/Libraries" "${RESONITE_INSTALL_DIR}/rml_libs" | ||
| curl -fsSL -o "${RESONITE_INSTALL_DIR}/Libraries/ResoniteModLoader.dll" \ | ||
| https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest/download/ResoniteModLoader.dll | ||
| curl -fsSL -o "${RESONITE_INSTALL_DIR}/rml_libs/0Harmony.dll" \ | ||
| https://github.com/resonite-modding-group/ResoniteModLoader/releases/latest/download/0Harmony.dll | ||
|
|
||
| - name: Restore | ||
| run: dotnet restore ./ViveStreamingFaceTrackingForResonite.sln --locked-mode -p:ResonitePath="${{ env.RESONITE_INSTALL_DIR }}/" | ||
|
|
||
| - name: Build | ||
| run: dotnet build ./ViveStreamingFaceTrackingForResonite.sln -c Release --no-restore -p:ResonitePath="${{ env.RESONITE_INSTALL_DIR }}/" | ||
|
|
||
| - name: Test | ||
| run: dotnet test ./ViveStreamingFaceTrackingForResonite.sln -c Release --no-build -p:ResonitePath="${{ env.RESONITE_INSTALL_DIR }}/" | ||
|
|
||
| - name: Pack artifact | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| mkdir -p artifacts | ||
| cp ./ViveStreamingFaceTrackingForResonite/bin/Release/ViveStreamingFaceTracking.dll ./artifacts/ | ||
|
|
||
| - name: Upload artifact | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: ViveStreamingFaceTracking | ||
| path: artifacts/ViveStreamingFaceTracking.dll | ||
|
|
||
| - name: Create GitHub Release | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| env: | ||
| GITHUB_TOKEN: ${{ github.token }} | ||
| run: gh release create "${{ github.ref_name }}" ./artifacts/ViveStreamingFaceTracking.dll --verify-tag --generate-notes | ||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,11 +12,11 @@ | |
| <Copyright>Copyright (c) 2025 $(Authors)</Copyright> | ||
| <PackageTags>Resonite,Mod,ResoniteModLoader,Vive,FaceTracking</PackageTags> | ||
| <PackageReadmeFile>README.md</PackageReadmeFile> | ||
| <Version>1.0.0</Version> | ||
| <Version>1.1.0</Version> | ||
| </PropertyGroup> | ||
| <!-- Common Build Properties --> | ||
| <PropertyGroup> | ||
| <TargetFramework>net9.0</TargetFramework> | ||
| <TargetFramework>net10.0</TargetFramework> | ||
| <LangVersion>latest</LangVersion> | ||
| <Nullable>enable</Nullable> | ||
| <Platforms>x64</Platforms> | ||
|
|
@@ -36,6 +36,7 @@ | |
| <WarningsAsErrors /> | ||
| <WarningsNotAsErrors>NU1701</WarningsNotAsErrors> | ||
| <GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
| <RestorePackagesWithLockFile>true</RestorePackagesWithLockFile> | ||
| </PropertyGroup> | ||
| <!-- Configuration-specific properties --> | ||
| <PropertyGroup Condition="'$(Configuration)'=='Debug'"> | ||
|
|
@@ -68,14 +69,18 @@ | |
| <PropertyGroup> | ||
| <ResonitePath>$([MSBuild]::EnsureTrailingSlash('$(ResonitePath)'))</ResonitePath> | ||
| </PropertyGroup> | ||
| <PropertyGroup> | ||
| <FrooxEnginePresent Condition="Exists('$([System.IO.Path]::Combine($(ResonitePath), `FrooxEngine.dll`))')">true</FrooxEnginePresent> | ||
| <FrooxEnginePresent Condition="'$(FrooxEnginePresent)'==''">false</FrooxEnginePresent> | ||
| </PropertyGroup> | ||
| <!-- Derived Resonite Paths --> | ||
| <PropertyGroup> | ||
| <ResoniteModsPath>$([System.IO.Path]::Combine('$(ResonitePath)', 'rml_mods'))</ResoniteModsPath> | ||
| <ResoniteHotReloadPath>$([System.IO.Path]::Combine('$(ResonitePath)', 'rml_mods', 'HotReloadMods'))</ResoniteHotReloadPath> | ||
| <ResoniteLibsPath>$([System.IO.Path]::Combine('$(ResonitePath)', 'rml_libs'))</ResoniteLibsPath> | ||
| </PropertyGroup> | ||
| <!-- Common Resonite References --> | ||
| <ItemGroup> | ||
| <ItemGroup Condition="'$(FrooxEnginePresent)'=='true'"> | ||
| <!-- Core Resonite Mod Dependencies --> | ||
| <Reference Include="ResoniteModLoader"> | ||
| <HintPath>$([System.IO.Path]::Combine('$(ResonitePath)', 'Libraries', 'ResoniteModLoader.dll'))</HintPath> | ||
|
|
@@ -105,6 +110,17 @@ | |
| <Private>$(IsTestProject)</Private> | ||
| </Reference> | ||
| </ItemGroup> | ||
| <ItemGroup Condition="'$(FrooxEnginePresent)'!='true'"> | ||
| <PackageReference Include="Resonite.GameLibs" /> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Avoid conditionally removing this package based on whether a local Resonite installation contains Useful? React with 👍 / 👎. |
||
| <Reference Include="ResoniteModLoader"> | ||
| <HintPath>$([System.IO.Path]::Combine('$(ResonitePath)', 'Libraries', 'ResoniteModLoader.dll'))</HintPath> | ||
| <Private>$(IsTestProject)</Private> | ||
| </Reference> | ||
| <Reference Include="HarmonyLib"> | ||
| <HintPath>$([System.IO.Path]::Combine('$(ResoniteLibsPath)', '0Harmony.dll'))</HintPath> | ||
| <Private>$(IsTestProject)</Private> | ||
| </Reference> | ||
| </ItemGroup> | ||
| <!-- Common Items --> | ||
| <ItemGroup> | ||
| <None Include="$(MSBuildThisFileDirectory).github\**\*" LinkBase=".github" /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limit
contents: writeto a separate tag-only release job rather than granting it to the entire build job. For same-repository pull requests, this workflow checks out and executes the PR's MSBuild/workflow code with a write-capableGITHUB_TOKEN, so a contributor or compromised build step can use${{ github.token }}to alter tags, releases, or repository contents even though only the final release command needs write access.Useful? React with 👍 / 👎.