File tree Expand file tree Collapse file tree
src/OverrideLauncher.Core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : build
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches : [ "v2" ]
6+
7+ env :
8+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
9+ compile-flags : " -c Release"
10+ jobs :
11+ test :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v3
16+ with :
17+ fetch-depth : 0
18+ - name : Setup .NET
19+ uses : actions/setup-dotnet@v2
20+ with :
21+ dotnet-version : ' 8.0.x'
22+ - name : Test
23+ run : dotnet test ./src/OverrideLauncher.Core/OverrideLauncher.Core.csproj
24+ test_build :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v3
29+ with :
30+ fetch-depth : 0
31+ - name : Setup .NET
32+ uses : actions/setup-dotnet@v2
33+ with :
34+ dotnet-version : ' 8.0.x'
35+ - name : Test
36+ run : dotnet build ./src/OverrideLauncher.Core/OverrideLauncher.Core.csproj
37+ build :
38+ runs-on : ubuntu-latest
39+ needs : [test, test_build]
40+ steps :
41+ - name : Checkout
42+ uses : actions/checkout@v3
43+ with :
44+ fetch-depth : 0
45+ - name : Setup .NET
46+ uses : actions/setup-dotnet@v2
47+ with :
48+ dotnet-version : ' 8.0.x'
49+ - name : Build OverrideLauncher.Core
50+ run : dotnet build ./src/OverrideLauncher.Core/OverrideLauncher.Core.csproj ${{ env.compile-flags }}
51+ - name : Set Version
52+ run : |
53+ current_date=$(date +"%y.%m.%d.%H%M")
54+ sed -i "s/<Version>[^<]*<\/Version>/<Version>$current_date<\/Version>/" ./src/OverrideLauncher.Core/OverrideLauncher.Core.csproj
55+ - name : Publish OverrideLauncher.Core
56+ uses : brandedoutcast/publish-nuget@v2.5.2
57+ with :
58+ PROJECT_FILE_PATH : ./src/OverrideLauncher.Core/OverrideLauncher.Core.csproj
59+ NUGET_KEY : ${{ secrets.NUGET_API_KEY }}
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk" >
2-
32 <PropertyGroup >
4- <TargetFramework >net8.0</TargetFramework >
5- <ImplicitUsings >enable</ImplicitUsings >
6- <Nullable >enable</Nullable >
3+ <Version >$([System.DateTime]::Now.ToString(yy.MM.dd.HHmm))</Version >
4+ <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
5+ <PackageIcon >logo.png</PackageIcon >
6+ </PropertyGroup >
7+ <PropertyGroup >
8+ <PackageProjectUrl >https://github.com/Round-Studio/OverrideLauncher.Core</PackageProjectUrl >
9+ <RepositoryUrl >https://github.com/Round-Studio/OverrideLauncher.Core</RepositoryUrl >
10+ <Description >新一代 MC 启动器,迅速、快速、轻便!</Description >
11+ <TargetFrameworks >net8.0</TargetFrameworks >
12+ <ImplicitUsings >enable</ImplicitUsings >
13+ <Authors >Round-Studio</Authors >
14+ <LangVersion >latest</LangVersion >
15+ <Title >OverrideLauncher</Title >
16+ <Nullable >disable</Nullable >
17+ <GenerateDocumentationFile >False</GenerateDocumentationFile >
718 </PropertyGroup >
819
920 <ItemGroup >
1425 <Compile Remove =" Classes\Install\DownloadPerformanceMonitor.cs" />
1526 </ItemGroup >
1627
28+ <ItemGroup >
29+ <None Update =" logo.png" >
30+ <Pack >True</Pack >
31+ <PackagePath ></PackagePath >
32+ </None >
33+ </ItemGroup >
34+
1735</Project >
You can’t perform that action at this time.
0 commit comments