Skip to content

Commit 45b7531

Browse files
release: prepare v0.0.3-beta
1 parent 3639d5e commit 45b7531

File tree

3 files changed

+213
-27
lines changed

3 files changed

+213
-27
lines changed

.github/workflows/nuget-publish.yml

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: 📦 Publish to NuGet
1+
name: 📦 Publish Package
22

33
on:
44
release:
@@ -12,14 +12,17 @@ on:
1212

1313
env:
1414
DOTNET_VERSION: '7.0.x'
15-
NUGET_SOURCE: 'https://api.nuget.org/v3/index.json'
1615
PROJECT_PATH: 'src/Component/Component.csproj'
1716

1817
jobs:
1918
publish:
20-
name: 🚀 Build & Publish to NuGet
19+
name: 🚀 Build & Publish
2120
runs-on: ubuntu-latest
2221

22+
permissions:
23+
contents: write # For uploading release assets
24+
packages: write # For GitHub Packages
25+
2326
steps:
2427
- name: 📥 Checkout
2528
uses: actions/checkout@v4
@@ -65,23 +68,72 @@ jobs:
6568
echo "📦 Created packages:"
6669
ls -la ./packages/
6770
68-
- name: 🚀 Push to NuGet
71+
# ═══════════════════════════════════════════════════════════
72+
# 1️⃣ Publish to NuGet.org
73+
# ═══════════════════════════════════════════════════════════
74+
- name: 🚀 Push to NuGet.org
6975
run: |
7076
dotnet nuget push ./packages/*.nupkg \
7177
--api-key ${{ secrets.NUGET_API_KEY }} \
72-
--source ${{ env.NUGET_SOURCE }} \
78+
--source https://api.nuget.org/v3/index.json \
79+
--skip-duplicate
80+
continue-on-error: false
81+
82+
# ═══════════════════════════════════════════════════════════
83+
# 2️⃣ Publish to GitHub Packages
84+
# ═══════════════════════════════════════════════════════════
85+
- name: 📦 Push to GitHub Packages
86+
run: |
87+
dotnet nuget push ./packages/*.nupkg \
88+
--api-key ${{ secrets.GITHUB_TOKEN }} \
89+
--source https://nuget.pkg.github.com/JsonViewer-Component/index.json \
7390
--skip-duplicate
91+
continue-on-error: true
7492

75-
- name: 📤 Upload NuGet Package Artifacts
76-
uses: actions/upload-artifact@v5
93+
# ═══════════════════════════════════════════════════════════
94+
# 3️⃣ Upload to GitHub Release Assets
95+
# ═══════════════════════════════════════════════════════════
96+
- name: 📎 Upload Release Assets
97+
if: github.event_name == 'release'
98+
uses: softprops/action-gh-release@v2
7799
with:
78-
name: nuget-packages
100+
files: |
101+
./packages/*.nupkg
102+
./packages/*.snupkg
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
106+
# ═══════════════════════════════════════════════════════════
107+
# 4️⃣ Upload as Workflow Artifacts
108+
# ═══════════════════════════════════════════════════════════
109+
- name: 📤 Upload Artifacts
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: nuget-packages-${{ steps.version.outputs.VERSION }}
79113
path: ./packages/*
114+
retention-days: 90
80115

116+
# ═══════════════════════════════════════════════════════════
117+
# 📝 Summary
118+
# ═══════════════════════════════════════════════════════════
81119
- name: 📝 Create Summary
82120
run: |
83-
echo "## 📦 NuGet Package Published" >> $GITHUB_STEP_SUMMARY
121+
echo "## 📦 Package Published Successfully!" >> $GITHUB_STEP_SUMMARY
122+
echo "" >> $GITHUB_STEP_SUMMARY
123+
echo "### Package Info" >> $GITHUB_STEP_SUMMARY
124+
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
125+
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
126+
echo "| **Name** | JsonViewer.Blazor |" >> $GITHUB_STEP_SUMMARY
127+
echo "| **Version** | ${{ steps.version.outputs.VERSION }} |" >> $GITHUB_STEP_SUMMARY
128+
echo "" >> $GITHUB_STEP_SUMMARY
129+
echo "### 📍 Published To" >> $GITHUB_STEP_SUMMARY
130+
echo "- ✅ [NuGet.org](https://www.nuget.org/packages/JsonViewer.Blazor/${{ steps.version.outputs.VERSION }})" >> $GITHUB_STEP_SUMMARY
131+
echo "- ✅ [GitHub Packages](https://github.com/JsonViewer-Component/Blazor/packages)" >> $GITHUB_STEP_SUMMARY
132+
if [ "${{ github.event_name }}" == "release" ]; then
133+
echo "- ✅ [Release Assets](https://github.com/JsonViewer-Component/Blazor/releases/tag/${{ github.event.release.tag_name }})" >> $GITHUB_STEP_SUMMARY
134+
fi
84135
echo "" >> $GITHUB_STEP_SUMMARY
85-
echo "- **Package**: JsonViewer.Blazor" >> $GITHUB_STEP_SUMMARY
86-
echo "- **Version**: ${{ steps.version.outputs.VERSION }}" >> $GITHUB_STEP_SUMMARY
87-
echo "- **NuGet**: https://www.nuget.org/packages/JsonViewer.Blazor" >> $GITHUB_STEP_SUMMARY
136+
echo "### 📥 Install" >> $GITHUB_STEP_SUMMARY
137+
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
138+
echo "dotnet add package JsonViewer.Blazor --version ${{ steps.version.outputs.VERSION }}" >> $GITHUB_STEP_SUMMARY
139+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

docs/CHANGELOG.md

Lines changed: 50 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
### Added
10+
<!-- Future changes go here -->
11+
12+
## [0.0.3-beta] - 2025-12-03
13+
14+
### ✨ Added
1115
- Professional GitHub repository structure
12-
- Comprehensive documentation
13-
- CI/CD pipelines
14-
- Security policies
16+
- Multi-target publishing (NuGet.org + GitHub Packages + Release Assets)
17+
- Comprehensive CI/CD pipelines
18+
- Security policies and code of conduct
19+
- Issue and PR templates
20+
- Automated dependency updates via Dependabot
21+
- CodeQL security analysis
22+
- Stale issue/PR management
23+
24+
### 🔄 Changed
25+
- Reorganized repository structure:
26+
- Moved community files to `.github/`
27+
- Moved documentation to `docs/`
28+
- Moved Docker files to `docker/`
29+
- Moved assets to `Documents/assets/`
30+
- Translated all Persian comments to English
31+
- Enhanced NuGet package metadata
32+
- Improved workflow configurations
33+
34+
### 📚 Documentation
35+
- Completely rewrote README.md in English
36+
- Added DEVELOPMENT.md guide
37+
- Added ROADMAP.md for future plans
38+
- Added CHANGELOG.md for version tracking
39+
- Added CONTRIBUTING.md guidelines
40+
- Added SECURITY.md policy
41+
42+
### 🔧 DevOps
43+
- Added GitHub Actions workflows:
44+
- Build & Test
45+
- Deploy to GitHub Pages
46+
- Publish to NuGet
47+
- CodeQL Security Analysis
48+
- Auto-labeling PRs
49+
- Greeting new contributors
50+
- Stale issue management
1551

1652
## [0.0.2-beta] - 2025-11-19
1753

@@ -74,6 +110,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
74110

75111
## Upgrade Guide
76112

113+
### From 0.0.2-beta to 0.0.3-beta
114+
115+
No breaking changes. Simply update your package reference:
116+
117+
```bash
118+
dotnet add package JsonViewer.Blazor --version 0.0.3-beta
119+
```
120+
77121
### From 0.0.1-beta to 0.0.2-beta
78122

79123
No breaking changes. Simply update your package reference:
@@ -106,7 +150,7 @@ See [CONTRIBUTING.md](../.github/CONTRIBUTING.md) for details on how to contribu
106150
- 🔒 Security - Security fixes
107151
- 📚 Documentation - Documentation changes
108152

109-
[Unreleased]: https://github.com/JsonViewer-Component/Blazor/compare/v0.0.2-beta...HEAD
153+
[Unreleased]: https://github.com/JsonViewer-Component/Blazor/compare/v0.0.3-beta...HEAD
154+
[0.0.3-beta]: https://github.com/JsonViewer-Component/Blazor/compare/v0.0.2-beta...v0.0.3-beta
110155
[0.0.2-beta]: https://github.com/JsonViewer-Component/Blazor/compare/v0.0.1-beta...v0.0.2-beta
111156
[0.0.1-beta]: https://github.com/JsonViewer-Component/Blazor/releases/tag/v0.0.1-beta
112-

src/Component/Component.csproj

Lines changed: 99 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,128 @@
44
<TargetFramework>net7.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7+
<LangVersion>latest</LangVersion>
8+
</PropertyGroup>
79

8-
<!-- NuGet Package Configuration -->
10+
<!-- ═══════════════════════════════════════════════════════════════ -->
11+
<!-- 📦 NuGet Package Metadata -->
12+
<!-- ═══════════════════════════════════════════════════════════════ -->
13+
<PropertyGroup>
14+
<!-- Basic Info -->
915
<PackageId>JsonViewer.Blazor</PackageId>
10-
<Version>0.0.2-beta</Version>
11-
<Authors>parsapanahpoor</Authors>
16+
<Version>0.0.3-beta</Version>
17+
<Title>JSON Viewer for Blazor</Title>
18+
<Authors>Parsa Panahpoor</Authors>
1219
<Company>JsonViewer-Component</Company>
1320
<Product>JsonViewer.Blazor</Product>
14-
<Description>A powerful JSON viewer component for Blazor with search, statistics, themes, and editing capabilities.</Description>
15-
<PackageTags>blazor;json;viewer;component;wasm;webassembly;dotnet;csharp</PackageTags>
21+
<Copyright>© 2025 Parsa Panahpoor. All rights reserved.</Copyright>
22+
23+
<!-- Description - Shows on NuGet page -->
24+
<Description>
25+
🚀 A powerful, feature-rich JSON viewer component for Blazor applications.
26+
27+
✨ Features:
28+
• VS Code-style syntax highlighting
29+
• Dark &amp; Light theme support with persistence
30+
• Real-time search with match highlighting and navigation
31+
• JSON statistics (size, depth, type distribution)
32+
• Edit mode with auto-formatting and validation
33+
• Copy &amp; Export functionality
34+
• Keyboard shortcuts (Enter, Shift+Enter)
35+
• Line numbers with active line highlighting
36+
• Expand/Collapse individual or all nodes
37+
• Fully responsive design
38+
• High performance - handles large JSON files
39+
40+
📦 Easy to install and use in Blazor WebAssembly and Blazor Server applications.
41+
</Description>
42+
43+
<!-- Summary for package manager UI -->
44+
<Summary>A powerful JSON viewer component for Blazor with search, statistics, themes, and editing capabilities.</Summary>
45+
46+
<!-- Tags - Help users find your package -->
47+
<PackageTags>blazor;json;viewer;component;wasm;webassembly;dotnet;csharp;razor;asp.net;json-viewer;syntax-highlighting;dark-theme;light-theme;search;export;copy;statistics;tree-view;collapsible;expandable;editor;formatter;beautifier</PackageTags>
48+
49+
<!-- Release Notes - Shows in NuGet "Release Notes" tab -->
50+
<PackageReleaseNotes>
51+
## 🎉 Version 0.0.3-beta
52+
53+
### ✨ New Features
54+
- Improved repository structure
55+
- Enhanced documentation
56+
- Better CI/CD pipeline
57+
58+
### 🐛 Bug Fixes
59+
- Fixed Persian comments translated to English
60+
- Fixed workflow issues
61+
- Improved code quality
62+
63+
### 📚 Documentation
64+
- Reorganized project structure
65+
- Updated all documentation to English
66+
- Added comprehensive CHANGELOG
67+
68+
For full changelog, visit: https://github.com/JsonViewer-Component/Blazor/blob/main/docs/CHANGELOG.md
69+
</PackageReleaseNotes>
70+
</PropertyGroup>
71+
72+
<!-- ═══════════════════════════════════════════════════════════════ -->
73+
<!-- 🔗 Links &amp; Repository -->
74+
<!-- ═══════════════════════════════════════════════════════════════ -->
75+
<PropertyGroup>
1676
<PackageProjectUrl>https://github.com/JsonViewer-Component/Blazor</PackageProjectUrl>
17-
<RepositoryUrl>https://github.com/JsonViewer-Component/Blazor</RepositoryUrl>
77+
<RepositoryUrl>https://github.com/JsonViewer-Component/Blazor.git</RepositoryUrl>
1878
<RepositoryType>git</RepositoryType>
19-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
20-
<PackageReadmeFile>README.md</PackageReadmeFile>
79+
<RepositoryBranch>main</RepositoryBranch>
80+
81+
<!-- NuGet package icon and readme -->
2182
<PackageIcon>logo.png</PackageIcon>
83+
<PackageReadmeFile>README.md</PackageReadmeFile>
84+
85+
<!-- License -->
86+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
87+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
88+
</PropertyGroup>
89+
90+
<!-- ═══════════════════════════════════════════════════════════════ -->
91+
<!-- 🛠️ Build Configuration -->
92+
<!-- ═══════════════════════════════════════════════════════════════ -->
93+
<PropertyGroup>
2294
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
2395
<GenerateDocumentationFile>true</GenerateDocumentationFile>
96+
<NoWarn>$(NoWarn);1591</NoWarn>
97+
98+
<!-- Deterministic builds for reproducibility -->
99+
<Deterministic>true</Deterministic>
100+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
101+
102+
<!-- Source Link for debugging -->
103+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
104+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
105+
<IncludeSymbols>true</IncludeSymbols>
106+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
107+
<DebugType>embedded</DebugType>
24108
</PropertyGroup>
25109

110+
<!-- ═══════════════════════════════════════════════════════════════ -->
111+
<!-- 📚 Dependencies -->
112+
<!-- ═══════════════════════════════════════════════════════════════ -->
26113
<ItemGroup>
27114
<SupportedPlatform Include="browser" />
28115
</ItemGroup>
29116

30117
<ItemGroup>
31118
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.20" />
119+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
32120
</ItemGroup>
33121

34122
<ItemGroup>
35123
<Folder Include="wwwroot\" />
36124
</ItemGroup>
37125

38-
<!-- Include files in NuGet package -->
126+
<!-- ═══════════════════════════════════════════════════════════════ -->
127+
<!-- 📦 Files included in NuGet Package -->
128+
<!-- ═══════════════════════════════════════════════════════════════ -->
39129
<ItemGroup>
40130
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
41131
<None Include="..\..\Documents\assets\logo.png" Pack="true" PackagePath="\" />

0 commit comments

Comments
 (0)