Compare commits

...

7 Commits

Author SHA1 Message Date
zznty
2743e5b42d okay 2022-11-06 21:02:41 +06:00
zznty
02bd9df059 fix because retarded exmaples 2022-11-06 21:00:24 +06:00
zznty
a5cc132151 add version string normalization 2022-11-06 20:57:56 +06:00
zznty
92dea1986c linux ci v5 2022-11-06 20:49:18 +06:00
zznty
c03eb79f81 linux ci v4 2022-11-06 20:46:54 +06:00
zznty
0ee9c5f97c test linux ci v3 2022-11-06 20:44:17 +06:00
zznty
c283059106 test linux ci v2 2022-11-06 20:41:26 +06:00
4 changed files with 13 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ jobs:
name: Build name: Build
runs-on: ubuntu-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
@@ -31,10 +31,15 @@ jobs:
run: dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github run: dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github
- 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
- uses: bhowell2/github-substring-action@v1.0.0
id: normalize_version
with:
value: ${{ env.TORCH_VERSION }}
index_of_str: "v"
- 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=${{ steps.normalize_version.outputs.substring }} /p:Version=${{ steps.normalize_version.outputs.substring }}
- 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 +58,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

View File

@@ -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'">

View File

@@ -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>

View File

@@ -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'">