diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..b7041d5
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,96 @@
+name: main
+
+permissions:
+ packages: write
+ contents: write
+ actions: read
+ checks: write
+
+on:
+ # on pull_request to master
+ pull_request:
+ types: [ opened, synchronize ]
+ branches: [ main, master ]
+
+ # manual
+ workflow_dispatch:
+
+env:
+ output: bin
+ project: Serilog.Enrichers.Autodesk.Revit
+ configuration: Release
+ default_branch: ${{ github.event.repository.default_branch }}
+
+jobs:
+ build:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ # Install the .NET Core workload
+ - name: Install .NET 8.0
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 8.0.x
+
+ # Build project: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-build
+ - name: Build
+ run: dotnet build -c ${{ env.configuration }}
+
+ # Test project: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-test
+ - name: Test
+ run: dotnet test -c ${{ env.configuration }} --logger trx --results-directory "TestResults"
+
+ # Upload tests results: https://github.com/dorny/test-reporter
+ - name: Upload tests results
+ uses: dorny/test-reporter@v1
+ if: success() || failure()
+ with:
+ name: dotnet tests
+ path: ./TestResults/*.trx
+ reporter: dotnet-trx
+
+ - name: Pack
+ run: dotnet pack -c ${{ env.configuration }} -o ${{ env.output }}
+
+ # Fetch version: https://github.com/kzrnm/get-net-sdk-project-versions-action
+ - name: Fetch version
+ uses: kzrnm/get-net-sdk-project-versions-action@v2
+ id: get-version
+ with:
+ proj-path: src/${{ env.project }}/${{ env.project }}.csproj
+
+ # Upload the nuget package: https://github.com/marketplace/actions/upload-a-build-artifact
+ - name: Upload
+ uses: actions/upload-artifact@v4
+ with:
+ name: nuget
+ path: |
+ ${{ env.output }}/*.nupkg
+ ${{ env.output }}/*.snupkg
+
+ # Publish the nuget package: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push
+ - name: Publish nuget
+ if: github.ref_name == env.default_branch
+ run: dotnet nuget push ${{ env.output }}/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
+
+ # Publish the nuget package: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-push
+ - name: Publish github
+ if: github.ref_name == env.default_branch
+ run: dotnet nuget push ${{ env.output }}/**/*.nupkg -s https://nuget.pkg.github.com/${{ github.REPOSITORY_OWNER }}/index.json -k ${{ github.TOKEN }} --skip-duplicate
+
+ # Publish release: https://github.com/softprops/action-gh-release
+ - name: Publish Release
+ if: github.ref_name == env.default_branch
+ uses: softprops/action-gh-release@v1
+ env:
+ GITHUB_TOKEN: ${{ github.TOKEN }}
+ with:
+ tag_name: v${{ steps.get-version.outputs.package-version }}
+ name: v${{ steps.get-version.outputs.package-version }}
+ body: v${{ steps.get-version.outputs.package-version }}
+ draft: true
+ prerelease: false
+ files: |
+ ${{ env.output }}/*.nupkg
+ ${{ env.output }}/*.snupkg
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 7094a04..cd01e5f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -395,4 +395,6 @@ FodyWeavers.xsd
# Rider auto-generates .iml files, and contentModel.xml
**/.idea/**/*.iml
**/.idea/**/contentModel.xml
-**/.idea/**/modules.xml
\ No newline at end of file
+**/.idea/**/modules.xml
+
+/.idea
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..a7c4f01
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,13 @@
+# Changelog
+
+All notable changes to this project will be documented in this file.
+
+The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
+and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [v2.0.0] - 2024-05-14
+### Add
+
+- net8.0 target framework
+- ci workflow
+- CHANGELOG.md
\ No newline at end of file
diff --git a/LICENSE.md b/LICENSE.md
index 0a9bf81..be3736b 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2023 Biseuv Olzhas (dosymep)
+Copyright (c) 2024 Biseuv Olzhas (dosymep)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index bdbf9fe..b0bcf46 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,11 @@
# Serilog.Enrichers.Autodesk.Revit
+[](https://www.jetbrains.com/rider)
+[](LICENSE.md)
+[](https://www.autodesk.com/products/revit/overview)
+[](https://github.com/dosymep/Serilog.Enrichers.Autodesk.Revit/actions/workflows/main.yml)
+
+
The Autodesk Revit enrichers for [Serilog](https://serilog.net).
### Getting started
diff --git a/src/Serilog.Enrichers.Autodesk.Revit.sln b/Serilog.Enrichers.Autodesk.Revit.sln
similarity index 71%
rename from src/Serilog.Enrichers.Autodesk.Revit.sln
rename to Serilog.Enrichers.Autodesk.Revit.sln
index 2554f80..9c6a8e2 100644
--- a/src/Serilog.Enrichers.Autodesk.Revit.sln
+++ b/Serilog.Enrichers.Autodesk.Revit.sln
@@ -1,17 +1,18 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit", "Serilog.Enrichers.Autodesk.Revit\Serilog.Enrichers.Autodesk.Revit.csproj", "{61752A6F-6BA7-4536-9B2A-482771608632}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit", "src/Serilog.Enrichers.Autodesk.Revit\Serilog.Enrichers.Autodesk.Revit.csproj", "{61752A6F-6BA7-4536-9B2A-482771608632}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CF804FA7-56A6-4FA0-B201-118E593BD4CD}"
ProjectSection(SolutionItems) = preProject
- ..\.editorconfig = ..\.editorconfig
- ..\CONTRIBUTING.md = ..\CONTRIBUTING.md
- ..\CREDITS.md = ..\CREDITS.md
- ..\LICENSE.md = ..\LICENSE.md
- ..\README.md = ..\README.md
+ .editorconfig = .editorconfig
+ CONTRIBUTING.md = CONTRIBUTING.md
+ CREDITS.md = CREDITS.md
+ LICENSE.md = LICENSE.md
+ README.md = README.md
+ CHANGELOG.md = CHANGELOG.md
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit.Tests", "Serilog.Enrichers.Autodesk.Revit.Tests\Serilog.Enrichers.Autodesk.Revit.Tests.csproj", "{B96FBB4D-121D-421B-897E-DC9E0484ED0C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Serilog.Enrichers.Autodesk.Revit.Tests", "src/Serilog.Enrichers.Autodesk.Revit.Tests\Serilog.Enrichers.Autodesk.Revit.Tests.csproj", "{B96FBB4D-121D-421B-897E-DC9E0484ED0C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore
deleted file mode 100644
index b7a12b9..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Rider ignored files
-/modules.xml
-/contentModel.xml
-/projectSettingsUpdater.xml
-/.idea.Serilog.Enrichers.Autodeks.Revit.iml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.name b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.name
deleted file mode 100644
index c0e722c..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-Serilog.Enrichers.Autodeks.Revit
\ No newline at end of file
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml
deleted file mode 100644
index df87cf9..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml b/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml
deleted file mode 100644
index 7b08163..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodeks.Revit/.idea/indexLayout.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore
deleted file mode 100644
index c7a43e2..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Rider ignored files
-/projectSettingsUpdater.xml
-/modules.xml
-/.idea.Serilog.Enrichers.Autodesk.Revit.iml
-/contentModel.xml
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.name b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.name
deleted file mode 100644
index 0fdf695..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-Serilog.Enrichers.Autodesk.Revit
\ No newline at end of file
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml
deleted file mode 100644
index df87cf9..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml
deleted file mode 100644
index 7b08163..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/indexLayout.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml b/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml
deleted file mode 100644
index 6c0b863..0000000
--- a/src/.idea/.idea.Serilog.Enrichers.Autodesk.Revit/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs b/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs
index 0f051f3..3e722eb 100644
--- a/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs
+++ b/src/Serilog.Enrichers.Autodesk.Revit.Tests/RevitCachedPropertyTests.cs
@@ -16,7 +16,7 @@ public void CustomPropertyEnricherIsApplied() {
log.Information(@"Hello, world!");
- Assert.NotNull(testSink.LogEvent);
+ Assert.That(testSink.LogEvent, Is.Not.Null);
Assert.That(propertyValue, Is.EqualTo(GetScalarValue(testSink?.LogEvent, propertyName)));
}
diff --git a/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj b/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj
index 0c6ff22..327b26d 100644
--- a/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj
+++ b/src/Serilog.Enrichers.Autodesk.Revit.Tests/Serilog.Enrichers.Autodesk.Revit.Tests.csproj
@@ -1,7 +1,7 @@
- net452;net8.0
+ net462;net8.0
enable
enable
false
@@ -15,14 +15,14 @@
-
-
+
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj b/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj
index 6e59496..6f0add1 100644
--- a/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj
+++ b/src/Serilog.Enrichers.Autodesk.Revit/Serilog.Enrichers.Autodesk.Revit.csproj
@@ -11,7 +11,7 @@
x64
autodesk-revit.png
dosymep
- Copyright (c) 2023 Biseuv Olzhas (dosymep)
+ Copyright (c) 2024 Biseuv Olzhas (dosymep)
https://github.com/dosymep/Serilog.Enrichers.Autodesk.Revit
https://github.com/dosymep/Serilog.Enrichers.Autodesk.Revit.git
Git
@@ -71,5 +71,7 @@
\
assets\README.md
+
+