Skip to content

Commit 70b195a

Browse files
authored
Merge pull request #15 from IvanMurzak/fix/json-serializer
fix: JsonSerializer - "True" string conversion to "Bool" type
2 parents 39d1ea9 + 06a852e commit 70b195a

30 files changed

Lines changed: 2915 additions & 88 deletions

.claude/settings.local.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
"allow": [
44
"Bash(git log:*)",
55
"Bash(dotnet test:*)",
6-
"Bash(dotnet build:*)"
6+
"Bash(dotnet build:*)",
7+
"Bash(git checkout:*)",
8+
"Bash(dotnet clean:*)",
9+
"Bash(gh pr:*)"
710
],
811
"deny": [],
912
"ask": []

.github/workflows/dotnet.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/pull_request.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Pull Request
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build-and-test:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-latest]
13+
dotnet-version: [ '9.0.x' ]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Setup .NET ${{ matrix.dotnet-version }}
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: ${{ matrix.dotnet-version }}
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
- name: Build
23+
run: dotnet build --no-restore --configuration Release
24+
- name: Test
25+
run: dotnet test --no-build --verbosity normal --configuration Release

.github/workflows/release.yml

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
check-version-tag:
9+
runs-on: ubuntu-latest
10+
outputs:
11+
version: ${{ steps.get_version.outputs.current-version }}
12+
prev_tag: ${{ steps.prev_tag.outputs.tag }}
13+
is_new_tag: ${{ !steps.tag_exists.outputs.exists }}
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-tags: true
19+
20+
- name: Get version from ReflectorNet.csproj
21+
id: get_version
22+
shell: bash
23+
run: |
24+
version=$(grep -oP '<Version>\K[^<]+' ReflectorNet/ReflectorNet.csproj)
25+
echo "current-version=$version" >> $GITHUB_OUTPUT
26+
echo "Found version: $version"
27+
28+
- name: Find previous version tag
29+
id: prev_tag
30+
uses: WyriHaximus/github-action-get-previous-tag@v1
31+
32+
- name: Check if tag exists
33+
id: tag_exists
34+
uses: mukunku/tag-exists-action@v1.6.0
35+
with:
36+
tag: ${{ steps.get_version.outputs.current-version }}
37+
38+
build-and-test:
39+
runs-on: ${{ matrix.os }}
40+
needs: check-version-tag
41+
if: needs.check-version-tag.outputs.is_new_tag == 'true'
42+
strategy:
43+
matrix:
44+
os: [ubuntu-latest]
45+
dotnet-version: [ '9.0.x' ]
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Setup .NET ${{ matrix.dotnet-version }}
49+
uses: actions/setup-dotnet@v4
50+
with:
51+
dotnet-version: ${{ matrix.dotnet-version }}
52+
- name: Restore dependencies
53+
run: dotnet restore
54+
- name: Build
55+
run: dotnet build --no-restore --configuration Release
56+
- name: Test
57+
run: dotnet test --no-build --verbosity normal --configuration Release
58+
59+
modify-release:
60+
runs-on: ubuntu-latest
61+
needs: [check-version-tag, build-and-test]
62+
if: needs.check-version-tag.outputs.is_new_tag == 'true'
63+
steps:
64+
- name: Checkout repository
65+
uses: actions/checkout@v4
66+
with:
67+
fetch-depth: 0
68+
fetch-tags: true
69+
70+
- name: Generate release description
71+
id: rel_desc
72+
env:
73+
GH_TOKEN: ${{ github.token }}
74+
run: |
75+
set -e
76+
version=${{ needs.check-version-tag.outputs.version }}
77+
prev_tag=${{ needs.check-version-tag.outputs.prev_tag }}
78+
repo_url="https://github.com/${GITHUB_REPOSITORY}"
79+
today=$(date +'%B %e, %Y')
80+
81+
echo "repo_url: $repo_url"
82+
echo "today: $today"
83+
84+
echo "# ReflectorNet Version $version" > release.md
85+
echo "**Released:** *$today*" >> release.md
86+
87+
echo "" >> release.md
88+
echo "---" >> release.md
89+
echo "" >> release.md
90+
91+
if [ -n "$prev_tag" ]; then
92+
echo "## Comparison" >> release.md
93+
echo "See every change: [Compare $prev_tag...$version]($repo_url/compare/$prev_tag...$version)" >> release.md
94+
95+
echo "" >> release.md
96+
echo "---" >> release.md
97+
echo "" >> release.md
98+
fi
99+
100+
echo "## Commit Summary (Newest → Oldest)" >> release.md
101+
for sha in $(git log --pretty=format:'%H' $prev_tag..HEAD); do
102+
username=$(gh api repos/${GITHUB_REPOSITORY}/commits/$sha --jq '.author.login // .commit.author.name')
103+
message=$(git log -1 --pretty=format:'%s' $sha)
104+
short_sha=$(git log -1 --pretty=format:'%h' $sha)
105+
echo "- [\`$short_sha\`]($repo_url/commit/$sha) — $message by @$username" >> release.md
106+
done
107+
printf "release_body<<ENDOFRELEASEBODY\n%s\nENDOFRELEASEBODY\n" "$(cat release.md)" >> $GITHUB_ENV
108+
echo "success=true" >> $GITHUB_OUTPUT
109+
110+
deploy:
111+
needs: [build-and-test, check-version-tag]
112+
runs-on: ubuntu-latest
113+
if: needs.check-version-tag.outputs.is_new_tag == 'true'
114+
steps:
115+
- uses: actions/checkout@v4
116+
- name: Setup .NET
117+
uses: actions/setup-dotnet@v4
118+
with:
119+
dotnet-version: '9.0.x'
120+
- name: Restore dependencies
121+
run: dotnet restore
122+
- name: Build
123+
run: dotnet build --no-restore --configuration Release
124+
- name: Pack
125+
run: dotnet pack ReflectorNet/ReflectorNet.csproj --no-build --configuration Release --output ./packages
126+
- name: Publish to NuGet
127+
run: dotnet nuget push ./packages/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11

22
# ReflectorNet
33

4-
[![nuget](https://img.shields.io/nuget/v/com.IvanMurzak.ReflectorNet)](https://www.nuget.org/packages/com.IvanMurzak.ReflectorNet/) ![License](https://img.shields.io/github/license/IvanMurzak/ReflectorNet) [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
4+
[![nuget](https://img.shields.io/nuget/v/com.IvanMurzak.ReflectorNet)](https://www.nuget.org/packages/com.IvanMurzak.ReflectorNet/)
5+
![License](https://img.shields.io/github/license/IvanMurzak/ReflectorNet)
6+
[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua)
57

6-
[![Tests](https://github.com/IvanMurzak/ReflectorNet/actions/workflows/dotnet.yml/badge.svg?branch=main)](https://github.com/IvanMurzak/ReflectorNet/actions/workflows/dotnet.yml) ![.NET 9.0](https://img.shields.io/badge/.NET-9.0-blue?logoColor=white) ![netstandard2.0](https://img.shields.io/badge/.NET-netstandard2.0-blue?logoColor=white) ![netstandard2.1](https://img.shields.io/badge/.NET-netstandard2.1-blue?logoColor=white)
8+
[![Tests](https://github.com/IvanMurzak/ReflectorNet/actions/workflows/dotnet.yml/badge.svg?branch=main)](https://github.com/IvanMurzak/ReflectorNet/actions/workflows/release.yml)
9+
![.NET 9.0](https://img.shields.io/badge/.NET-9.0-blue?logoColor=white)
10+
![netstandard2.1](https://img.shields.io/badge/.NET-netstandard2.1-blue?logoColor=white)
711

812
ReflectorNet is an advanced .NET reflection toolkit specifically designed for AI-driven scenarios. It provides sophisticated reflection-based serialization, deserialization, population, and method invocation capabilities that enable seamless integration between AI systems and .NET applications.
913

0 commit comments

Comments
 (0)