Skip to content

Commit 295ccb4

Browse files
committed
💾 Feat: Adapt to new structure
1 parent 3c5224b commit 295ccb4

File tree

3 files changed

+60
-24
lines changed

3 files changed

+60
-24
lines changed

‎.github/workflows/build.yml

+31-24
Original file line numberDiff line numberDiff line change
@@ -15,42 +15,48 @@ on:
1515
- "**/*.md"
1616

1717
workflow_dispatch:
18-
18+
1919
jobs:
2020
build-on-windows:
2121
runs-on: windows-latest
2222

2323
steps:
24-
2524
- uses: actions/checkout@v3
2625

2726
- name: Setup .NET
28-
uses: actions/setup-dotnet@v2
27+
uses: actions/setup-dotnet@v4
2928
with:
30-
dotnet-version: '6.0.x'
31-
include-prerelease: false
29+
dotnet-version: "8.0.x"
30+
31+
- name: Test
32+
working-directory: "Common.Algorithm.Core.Test"
33+
run: |
34+
dotnet test
3235
33-
- name: Build Interop
36+
- name: Build
37+
working-directory: "Common.Algorithm.Core"
3438
run: |
35-
cd "Common.Algorithm.Interop"
3639
dotnet build -c Release
3740
3841
build-on-ubuntu:
3942
runs-on: ubuntu-latest
4043

4144
steps:
42-
4345
- uses: actions/checkout@v3
4446

4547
- name: Setup .NET
46-
uses: actions/setup-dotnet@v2
48+
uses: actions/setup-dotnet@v4
4749
with:
48-
dotnet-version: '6.0.x'
49-
include-prerelease: false
50+
dotnet-version: "8.0.x"
51+
52+
- name: Test
53+
working-directory: "Common.Algorithm.Core.Test"
54+
run: |
55+
dotnet test
5056
51-
- name: Build Interop
57+
- name: Build
58+
working-directory: "Common.Algorithm.Core"
5259
run: |
53-
cd "Common.Algorithm.Interop"
5460
dotnet build -c Release
5561
5662
- name: Add to GitHub Repo
@@ -60,29 +66,30 @@ jobs:
6066
- name: Install NuGet
6167
uses: nuget/setup-nuget@v1
6268
with:
63-
nuget-version: '6.x'
69+
nuget-version: "6.x"
6470

6571
- name: Publish Package to GitHub and NuGet
6672
run: |
67-
nuget push ./Common.Algorithm.Interop/bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol
68-
nuget push ./Common.Algorithm.Interop/bin/Release/*.nupkg -Source github -SkipDuplicate
73+
nuget push ./Common.Algorithm.Core/bin/Release/*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }} -NoSymbol
74+
nuget push ./Common.Algorithm.Core/bin/Release/*.nupkg -Source github -SkipDuplicate
6975
7076
build-on-macos:
7177
runs-on: macos-latest
7278

7379
steps:
74-
7580
- uses: actions/checkout@v3
7681

7782
- name: Setup .NET
78-
uses: actions/setup-dotnet@v2
83+
uses: actions/setup-dotnet@v4
7984
with:
80-
dotnet-version: '6.0.x'
81-
include-prerelease: false
85+
dotnet-version: "8.0.x"
8286

83-
- name: Build Interop
87+
- name: Test
88+
working-directory: "Common.Algorithm.Core.Test"
8489
run: |
85-
cd "Common.Algorithm.Interop"
86-
dotnet build -c Release
87-
90+
dotnet test
8891
92+
- name: Build
93+
working-directory: "Common.Algorithm.Core"
94+
run: |
95+
dotnet build -c Release

‎Common.Algorithm.Core/Common.Algorithm.Core.csproj

+29
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,33 @@
66
<Nullable>enable</Nullable>
77
</PropertyGroup>
88

9+
<PropertyGroup>
10+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
11+
<Authors>Dynesshely</Authors>
12+
<Company>Crequency</Company>
13+
<Description>Common Algorithms Library</Description>
14+
<Copyright>Copyright © Crequency 2022-present. All Rights Reserved.</Copyright>
15+
<PackageProjectUrl>https://github.com/Crequency/Common.Algorithm</PackageProjectUrl>
16+
<PackageIcon>icon.png</PackageIcon>
17+
<RepositoryUrl>https://github.com/Crequency/Common.Algorithm</RepositoryUrl>
18+
<RepositoryType>git</RepositoryType>
19+
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
20+
<PackageLicenseExpression>AGPL-3.0-only</PackageLicenseExpression>
21+
<PackageId>$(AssemblyName)</PackageId>
22+
<SignAssembly>False</SignAssembly>
23+
</PropertyGroup>
24+
25+
<PropertyGroup>
26+
<AssemblyVersion>$(Version)</AssemblyVersion>
27+
<FileVersion>$(Version)</FileVersion>
28+
<Version>2.0.$([System.DateTime]::UtcNow.Date.Subtract($([System.DateTime]::Parse("2005-06-06"))).TotalDays).$([System.Math]::Floor($([System.DateTime]::UtcNow.TimeOfDay.TotalMinutes)))</Version>
29+
</PropertyGroup>
30+
31+
<ItemGroup>
32+
<None Update="icon.png">
33+
<Pack>True</Pack>
34+
<PackagePath>\</PackagePath>
35+
</None>
36+
</ItemGroup>
37+
938
</Project>

‎Common.Algorithm.Core/icon.png

61.1 KB
Loading

0 commit comments

Comments
 (0)