Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
92dea1986c | ||
![]() |
c03eb79f81 | ||
![]() |
0ee9c5f97c | ||
![]() |
c283059106 | ||
![]() |
422963517f | ||
![]() |
d2ac0e44be |
12
.github/workflows/release.yaml
vendored
12
.github/workflows/release.yaml
vendored
@@ -8,9 +8,9 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ github.ref_name }}
|
TORCH_VERSION: ${{ github.ref_name }}
|
||||||
BUILD_CONFIGURATION: Release
|
BUILD_CONFIGURATION: Release
|
||||||
DOTNET_NOLOGO: true
|
DOTNET_NOLOGO: true
|
||||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||||
@@ -32,9 +32,9 @@ jobs:
|
|||||||
- name: Restore dependencies
|
- name: Restore dependencies
|
||||||
run: dotnet restore Torch.Server/Torch.Server.csproj --use-lock-file
|
run: dotnet restore Torch.Server/Torch.Server.csproj --use-lock-file
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build Torch.Server/Torch.Server.csproj --no-restore -c $env:BUILD_CONFIGURATION /p:AssemblyVersion=$env:VERSION /p:Version=$env:VERSION
|
run: dotnet build Torch.Server/Torch.Server.csproj --no-restore -c ${{ env.BUILD_CONFIGURATION }} /p:AssemblyVersion=${{ env.TORCH_VERSION }} /p:Version=${{ env.TORCH_VERSION }}
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish Torch.Server/Torch.Server.csproj --no-build -r win-x64 --sc -c $env:BUILD_CONFIGURATION -o ./publish
|
run: dotnet publish Torch.Server/Torch.Server.csproj --no-build -r win-x64 --sc -c ${{ env.BUILD_CONFIGURATION }} -o ./publish
|
||||||
- uses: vimtor/action-zip@v1
|
- uses: vimtor/action-zip@v1
|
||||||
name: Zip Release
|
name: Zip Release
|
||||||
with:
|
with:
|
||||||
@@ -53,8 +53,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ env.VERSION }}
|
tag_name: ${{ env.TORCH_VERSION }}
|
||||||
release_name: Release v${{ env.VERSION }}
|
release_name: Release v${{ env.TORCH_VERSION }}
|
||||||
body: ${{ steps.github_release.outputs.changelog }}
|
body: ${{ steps.github_release.outputs.changelog }}
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
|
@@ -8,9 +8,7 @@
|
|||||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||||
<OutputPath>..\bin\$(Platform)\$(Configuration)\</OutputPath>
|
<OutputPath>..\bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||||
<UseWpf>True</UseWpf>
|
<UseWpf>True</UseWpf>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||||
<Configurations>Debug;Release</Configurations>
|
|
||||||
<Platforms>AnyCPU</Platforms>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="$(Configuration) == 'Release'">
|
<PropertyGroup Condition="$(Configuration) == 'Release'">
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||||
<NeutralLanguage>en</NeutralLanguage>
|
<NeutralLanguage>en</NeutralLanguage>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@@ -12,6 +12,7 @@ using System.Reflection.Emit;
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Microsoft.CodeAnalysis;
|
using Microsoft.CodeAnalysis;
|
||||||
|
using ParallelTasks;
|
||||||
using ProtoBuf;
|
using ProtoBuf;
|
||||||
using Torch.Managers.PatchManager;
|
using Torch.Managers.PatchManager;
|
||||||
using Torch.Managers.PatchManager.MSIL;
|
using Torch.Managers.PatchManager.MSIL;
|
||||||
@@ -82,6 +83,14 @@ namespace Torch.Patches
|
|||||||
|
|
||||||
using var batch = MyScriptCompiler.Static.Whitelist.OpenBatch();
|
using var batch = MyScriptCompiler.Static.Whitelist.OpenBatch();
|
||||||
batch.AllowTypes(MyWhitelistTarget.ModApi, typeof(ConcurrentQueue<>));
|
batch.AllowTypes(MyWhitelistTarget.ModApi, typeof(ConcurrentQueue<>));
|
||||||
|
batch.AllowNamespaceOfTypes(MyWhitelistTarget.Both, typeof(ImmutableArray), typeof(ArrayExtensions));
|
||||||
|
batch.AllowTypes(MyWhitelistTarget.ModApi, typeof(ProtoContractAttribute).Assembly.GetExportedTypes()
|
||||||
|
.Where(b => b.Namespace == "ProtoBuf" && b.Name.Contains("Attribute"))
|
||||||
|
.Concat(new[]
|
||||||
|
{
|
||||||
|
typeof(DataFormat), typeof(MemberSerializationOptions), typeof(ImplicitFields)
|
||||||
|
}).ToArray());
|
||||||
|
batch.AllowTypes(MyWhitelistTarget.ModApi, typeof(WorkData));
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -12,6 +12,7 @@
|
|||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<Configurations>Debug;Release</Configurations>
|
<Configurations>Debug;Release</Configurations>
|
||||||
<Platforms>AnyCPU</Platforms>
|
<Platforms>AnyCPU</Platforms>
|
||||||
|
<EnableWindowsTargeting>true</EnableWindowsTargeting>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="$(Configuration) == 'Release'">
|
<PropertyGroup Condition="$(Configuration) == 'Release'">
|
||||||
|
Reference in New Issue
Block a user