Skip to content

Commit

Permalink
Upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Dec 20, 2024
1 parent 75f9ec9 commit a27fad3
Show file tree
Hide file tree
Showing 18 changed files with 331 additions and 19 deletions.
125 changes: 125 additions & 0 deletions .github/workflows/Cogito.Seq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Cogito.Seq

on:
workflow_dispatch:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
release:
types:
- created

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3
with:
versionSpec: 5.x
- name: Execute GitVersion
uses: gittools/actions/gitversion/execute@v3
with:
useConfigFile: true
- name: Add NuGet Source (GitHub)
shell: pwsh
run: dotnet nuget add source --username USERNAME --password $env:GITHUB_TOKEN --store-password-in-clear-text --name alethic $env:GITHUB_REPOS
env:
GITHUB_REPOS: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: NuGet Restore
run: dotnet restore Cogito.Seq.sln
- name: Build
shell: pwsh
run: |
dotnet msbuild /m /bl `
/p:Configuration="Release" `
/p:Platform="Any CPU" `
/p:Version=${env:GitVersion_FullSemVer} `
/p:AssemblyVersion=${env:GitVersion_AssemblySemVer} `
/p:InformationalVersion=${env:GitVersion_InformationalVersion} `
/p:FileVersion=${env:GitVersion_AssemblySemFileVer} `
/p:PackageVersion=${env:GitVersion_FullSemVer} `
/p:RepositoryUrl="${env:GITHUB_SERVER_URL}/${env:GITHUB_REPOSITORY}.git" `
/p:PackageProjectUrl="${env:GITHUB_SERVER_URL}/${env:GITHUB_REPOSITORY}" `
/p:BuildInParallel=true `
/p:ContinuousIntegrationBuild=true `
Cogito.Seq.dist.msbuildproj
- name: Upload MSBuild Log
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: msbuild.binlog
path: msbuild.binlog
- name: Upload NuGet Packages
uses: actions/upload-artifact@v4
with:
name: nuget
path: dist/nuget
release:
name: Release
if: github.event_name != 'pull_request'
needs:
- build
runs-on: ubuntu-22.04
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3
with:
versionSpec: 5.x
- name: Execute GitVersion
id: GitVersion
uses: gittools/actions/gitversion/execute@v3
with:
useConfigFile: true
- name: Download NuGet Packages
uses: actions/download-artifact@v4
with:
name: nuget
path: dist/nuget
- name: Create Release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.GitVersion.outputs.semVer }}
allowUpdates: true
omitBodyDuringUpdate: true
artifacts: dist/nuget/*.nupkg,dist/nuget/*.snupkg,dist/doc.zip
makeLatest: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Push NuGet (GitHub)
if: github.event_name != 'pull_request'
shell: pwsh
run: dotnet nuget push dist/nuget/*.nupkg --source $env:GITHUB_REPOS --api-key $env:GITHUB_TOKEN --skip-duplicate
env:
GITHUB_REPOS: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Push NuGet
if: github.ref_type == 'tag'
shell: pwsh
run: dotnet nuget push dist/nuget/*.nupkg --source $env:NUGET_REPOS --api-key $env:NUGET_TOKEN --skip-duplicate
env:
NUGET_REPOS: https://api.nuget.org/v3/index.json
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,6 @@ paket-files/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc

/dist
32 changes: 32 additions & 0 deletions Cogito.Seq.dist.msbuildproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project DefaultTargets="Publish">
<PropertyGroup>
<DistDir Condition="'$(DistDir)' == ''">$(DISTDIR)</DistDir>
<DistDir Condition="'$(DistDir)' == ''">$([System.IO.Path]::Combine('$(MSBuildThisFileDirectory)', 'dist'))</DistDir>
<DistDir>$([System.IO.Path]::GetFullPath('$(DistDir)'))</DistDir>
<SolutionFile>$([System.IO.Path]::Combine('$(MSBuildThisFileDirectory)', 'Cogito.Seq.sln'))</SolutionFile>
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
<Platform Condition=" '$(Platform)' == '' ">Any CPU</Platform>
</PropertyGroup>

<ItemGroup>
<TargetsForPublish Include="$(SolutionFile)">
<Targets>dist%5Cdist-nuget:Publish</Targets>
<Properties>PublishDir=$(DistDir)\nuget</Properties>
</TargetsForPublish>
<TargetsForPublish Include="$(SolutionFile)">
<Targets>dist%5Cdist-tests:Publish</Targets>
<Properties>PublishDir=$(DistDir)\tests</Properties>
</TargetsForPublish>
</ItemGroup>

<Target Name="Publish">
<ItemGroup>
<_TargetsForPublish Include="@(TargetsForPublish)">
<Properties>%(TargetsForPublish.Properties)</Properties>
</_TargetsForPublish>
</ItemGroup>

<MSBuild BuildInParallel="$(BuildInParallel)" ContinueOnError="false" Projects="@(_TargetsForPublish)" Targets="%(_TargetsForPublish.Targets)" />
</Target>

</Project>
40 changes: 36 additions & 4 deletions Cogito.Seq.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,33 @@ VisualStudioVersion = 17.7.34221.43
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7271F8CF-C4EC-47FE-91F3-FF3331482C4F}"
ProjectSection(SolutionItems) = preProject
.gitattributes = .gitattributes
.gitignore = .gitignore
appveyor.yml = appveyor.yml
Cogito.Seq.dist.msbuildproj = Cogito.Seq.dist.msbuildproj
.github\workflows\Cogito.Seq.yml = .github\workflows\Cogito.Seq.yml
Directory.Build.props = Directory.Build.props
GitVersion.yml = GitVersion.yml
global.json = global.json
icon.png = icon.png
LICENSE = LICENSE
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq", "Cogito.Seq\Cogito.Seq.csproj", "{5277E2FC-4772-4FA6-B463-F64C6BD020C7}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq", "src\Cogito.Seq\Cogito.Seq.csproj", "{5277E2FC-4772-4FA6-B463-F64C6BD020C7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq.Autofac", "Cogito.Seq.Autofac\Cogito.Seq.Autofac.csproj", "{22DAF356-6F10-45EA-A435-26DDEA0C56AB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq.Autofac", "src\Cogito.Seq.Autofac\Cogito.Seq.Autofac.csproj", "{22DAF356-6F10-45EA-A435-26DDEA0C56AB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq.Serilog", "Cogito.Seq.Serilog\Cogito.Seq.Serilog.csproj", "{B3CEF10D-76ED-40A3-B73E-9C65606EB7C0}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq.Serilog", "src\Cogito.Seq.Serilog\Cogito.Seq.Serilog.csproj", "{B3CEF10D-76ED-40A3-B73E-9C65606EB7C0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq.Serilog.Autofac", "Cogito.Seq.Serilog.Autofac\Cogito.Seq.Serilog.Autofac.csproj", "{CF3DB072-F5A6-4540-A1F5-4C452CFB56D9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cogito.Seq.Serilog.Autofac", "src\Cogito.Seq.Serilog.Autofac\Cogito.Seq.Serilog.Autofac.csproj", "{CF3DB072-F5A6-4540-A1F5-4C452CFB56D9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7E7C8ABF-FE50-468D-811D-7F6E3B013E7D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "dist", "dist", "{B964859D-F754-40CE-919A-32C388859D56}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dist-nuget", "src\dist-nuget\dist-nuget.csproj", "{A9227BCD-FC28-4609-A935-492726826A5D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dist-tests", "src\dist-tests\dist-tests.csproj", "{23CF5B37-5073-4AFC-B262-03625FB053FF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -39,10 +55,26 @@ Global
{CF3DB072-F5A6-4540-A1F5-4C452CFB56D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CF3DB072-F5A6-4540-A1F5-4C452CFB56D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CF3DB072-F5A6-4540-A1F5-4C452CFB56D9}.Release|Any CPU.Build.0 = Release|Any CPU
{A9227BCD-FC28-4609-A935-492726826A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A9227BCD-FC28-4609-A935-492726826A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A9227BCD-FC28-4609-A935-492726826A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A9227BCD-FC28-4609-A935-492726826A5D}.Release|Any CPU.Build.0 = Release|Any CPU
{23CF5B37-5073-4AFC-B262-03625FB053FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23CF5B37-5073-4AFC-B262-03625FB053FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23CF5B37-5073-4AFC-B262-03625FB053FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23CF5B37-5073-4AFC-B262-03625FB053FF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{5277E2FC-4772-4FA6-B463-F64C6BD020C7} = {7E7C8ABF-FE50-468D-811D-7F6E3B013E7D}
{22DAF356-6F10-45EA-A435-26DDEA0C56AB} = {7E7C8ABF-FE50-468D-811D-7F6E3B013E7D}
{B3CEF10D-76ED-40A3-B73E-9C65606EB7C0} = {7E7C8ABF-FE50-468D-811D-7F6E3B013E7D}
{CF3DB072-F5A6-4540-A1F5-4C452CFB56D9} = {7E7C8ABF-FE50-468D-811D-7F6E3B013E7D}
{A9227BCD-FC28-4609-A935-492726826A5D} = {B964859D-F754-40CE-919A-32C388859D56}
{23CF5B37-5073-4AFC-B262-03625FB053FF} = {B964859D-F754-40CE-919A-32C388859D56}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FF4B3820-4206-4316-82A5-DEA5792C6A71}
EndGlobalSection
Expand Down
42 changes: 33 additions & 9 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,39 @@
<Project>
<PropertyGroup>
<Authors>Jerome Haltom</Authors>
<Company>Alethic Solutions</Company>
<RepositoryUrl>https://github.com/alethic/Cogito.Seq</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageProjectUrl>https://github.com/alethic/Cogito.Seq</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>icon.png</PackageIcon>
<LangVersion>8.0</LangVersion>
<LangVersion Condition=" '$(LangVersion)' == '' ">12.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)icon.png" Pack="true" PackagePath="" />
<Authors Include="Jerome Haltom" />
</ItemGroup>

<PropertyGroup Label="Copyright Info">
<ProductName>Cogito.Seq</ProductName>
<Authors>@(Authors, ',')</Authors>
<CurrentYear Condition=" '$(CurrentYear)' == '' ">$([System.DateTime]::UtcNow.Year.ToString())</CurrentYear>
<Copyright>Copyright © $(CurrentYear) @(Authors, ', ')</Copyright>
</PropertyGroup>

<PropertyGroup Label="Version Info">
<DefaultMajorVersion>0</DefaultMajorVersion>
<Version Condition=" '$(Version)' == '' ">$(DefaultMajorVersion).0.0-dev</Version>
<AssemblyVersion Condition=" '$(AssemblyVersion)' == '' ">$(DefaultMajorVersion).0.0.0</AssemblyVersion>
<FileVersion Condition=" '$(FileVersion)' == '' ">$(DefaultMajorVersion).0.0.0</FileVersion>
<InformationalVersion Condition=" '$(InformationalVersion)' == '' ">$(DefaultMajorVersion).0.0.0</InformationalVersion>
</PropertyGroup>

<PropertyGroup Label="Package Info">
<RepositoryUrl Condition=" '$(RepositoryUrl)' == '' ">https://github.com/alethic/Cogito.Seq.git</RepositoryUrl>
<RepositoryType Condition=" '$(RepositoryType)' == '' ">git</RepositoryType>
<PackageProjectUrl Condition=" '$(PackageProjectUrl)' == '' ">https://github.com/alethic/Cogito.Seq</PackageProjectUrl>
<PackageVersion Condition=" '$(PackageVersion)' == '' ">$(Version)</PackageVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IKVM.Core.MSBuild" Version="0.1.106">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
16 changes: 15 additions & 1 deletion GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
mode: Mainline
mode: ContinuousDeployment
assembly-file-versioning-format: '{Major}.{Minor}.{Patch}.{WeightedPreReleaseNumber ?? 0}'
major-version-bump-message: '\+semver:\s?(major)'
minor-version-bump-message: '\+semver:\s?(minor)'
patch-version-bump-message: '\+semver:\s?(patch)'
branches:
main:
regex: ^main$
tag: pre
increment: Patch
develop:
regex: ^develop$
tag: dev
increment: Minor

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Alethic Solutions

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 9 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"sdk": {
"version": "8.0.100",
"rollForward": "latestFeature"
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.7.56"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Various utilities for Seq.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Various utilities for Seq.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Various utilities for Seq.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Description>Various utilities for Seq.</Description>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

</Project>
File renamed without changes.
23 changes: 23 additions & 0 deletions src/dist-nuget/dist-nuget.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>

<ItemGroup>
<PackageProjectReference Include="..\Cogito.Seq\Cogito.Seq.csproj">
<PackageTargetPath>.</PackageTargetPath>
</PackageProjectReference>
<PackageProjectReference Include="..\Cogito.Seq.Autofac\Cogito.Seq.Autofac.csproj">
<PackageTargetPath>.</PackageTargetPath>
</PackageProjectReference>
<PackageProjectReference Include="..\Cogito.Seq.Serilog\Cogito.Seq.Serilog.csproj">
<PackageTargetPath>.</PackageTargetPath>
</PackageProjectReference>
<PackageProjectReference Include="..\Cogito.Seq.Serilog.Autofac\Cogito.Seq.Serilog.Autofac.csproj">
<PackageTargetPath>.</PackageTargetPath>
</PackageProjectReference>
</ItemGroup>

</Project>
Loading

0 comments on commit a27fad3

Please sign in to comment.