Skip to content

Commit

Permalink
💾 Feat: Adapt to new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Sep 29, 2024
1 parent 3c5224b commit 295ccb4
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 24 deletions.
55 changes: 31 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,48 @@ on:
- "**/*.md"

workflow_dispatch:

jobs:
build-on-windows:
runs-on: windows-latest

steps:

- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
include-prerelease: false
dotnet-version: "8.0.x"

- name: Test
working-directory: "Common.Algorithm.Core.Test"
run: |
dotnet test
- name: Build Interop
- name: Build
working-directory: "Common.Algorithm.Core"
run: |
cd "Common.Algorithm.Interop"
dotnet build -c Release
build-on-ubuntu:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
include-prerelease: false
dotnet-version: "8.0.x"

- name: Test
working-directory: "Common.Algorithm.Core.Test"
run: |
dotnet test
- name: Build Interop
- name: Build
working-directory: "Common.Algorithm.Core"
run: |
cd "Common.Algorithm.Interop"
dotnet build -c Release
- name: Add to GitHub Repo
Expand All @@ -60,29 +66,30 @@ jobs:
- name: Install NuGet
uses: nuget/setup-nuget@v1
with:
nuget-version: '6.x'
nuget-version: "6.x"

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

steps:

- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
include-prerelease: false
dotnet-version: "8.0.x"

- name: Build Interop
- name: Test
working-directory: "Common.Algorithm.Core.Test"
run: |
cd "Common.Algorithm.Interop"
dotnet build -c Release
dotnet test
- name: Build
working-directory: "Common.Algorithm.Core"
run: |
dotnet build -c Release
29 changes: 29 additions & 0 deletions Common.Algorithm.Core/Common.Algorithm.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,33 @@
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Authors>Dynesshely</Authors>
<Company>Crequency</Company>
<Description>Common Algorithms Library</Description>
<Copyright>Copyright © Crequency 2022-present. All Rights Reserved.</Copyright>
<PackageProjectUrl>https://github.com/Crequency/Common.Algorithm</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/Crequency/Common.Algorithm</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>AGPL-3.0-only</PackageLicenseExpression>
<PackageId>$(AssemblyName)</PackageId>
<SignAssembly>False</SignAssembly>
</PropertyGroup>

<PropertyGroup>
<AssemblyVersion>$(Version)</AssemblyVersion>
<FileVersion>$(Version)</FileVersion>
<Version>2.0.$([System.DateTime]::UtcNow.Date.Subtract($([System.DateTime]::Parse("2005-06-06"))).TotalDays).$([System.Math]::Floor($([System.DateTime]::UtcNow.TimeOfDay.TotalMinutes)))</Version>
</PropertyGroup>

<ItemGroup>
<None Update="icon.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

</Project>
Binary file added Common.Algorithm.Core/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 295ccb4

Please sign in to comment.