Skip to content

Commit 0c7a538

Browse files
authored
Merge pull request #3 from osisdie/doc/refactor
Prepare v1.0.0: MIT license, centralized NuGet metadata, .NET 11 CI
2 parents 8ed3d8a + 5cdac53 commit 0c7a538

File tree

67 files changed

+215
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+215
-333
lines changed

.github/workflows/dotnet.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
continue-on-error: ${{ matrix.experimental || false }}
1213

1314
strategy:
15+
fail-fast: false
1416
matrix:
15-
dotnet-version: ['8.0.x', '10.0.x']
17+
dotnet-version: ['8.0.x', '10.0.x', '11.0.x']
18+
include:
19+
- dotnet-version: '11.0.x'
20+
experimental: true
21+
prerelease: true
1622

1723
steps:
1824
- uses: actions/checkout@v4
@@ -21,6 +27,7 @@ jobs:
2127
uses: actions/setup-dotnet@v4
2228
with:
2329
dotnet-version: ${{ matrix.dotnet-version }}
30+
include-prerelease: ${{ matrix.prerelease || false }}
2431

2532
- name: Restore dependencies
2633
run: dotnet restore
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: NuGet Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: '8.0.x'
22+
23+
- name: Restore
24+
run: dotnet restore
25+
26+
- name: Build
27+
run: dotnet build --configuration Release --no-restore
28+
29+
- name: Pack
30+
run: dotnet pack --configuration Release --no-build --output ./nupkgs
31+
32+
- name: Push to NuGet
33+
run: dotnet nuget push "./nupkgs/*.nupkg" --api-key "$NUGET_API_KEY" --source https://api.nuget.org/v3/index.json --skip-duplicate
34+
env:
35+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

CODE_OF_CONDUCT.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a welcoming experience for everyone.
7+
8+
## Our Standards
9+
10+
Examples of behavior that contributes to a positive environment:
11+
12+
* Using welcoming and inclusive language
13+
* Being respectful of differing viewpoints and experiences
14+
* Gracefully accepting constructive criticism
15+
* Focusing on what is best for the community
16+
* Showing empathy towards other community members
17+
18+
Examples of unacceptable behavior:
19+
20+
* Trolling, insulting or derogatory comments, and personal or political attacks
21+
* Publishing others' private information without explicit permission
22+
* Other conduct which could reasonably be considered inappropriate in a professional setting
23+
24+
## Enforcement Responsibilities
25+
26+
Community leaders are responsible for clarifying and enforcing our standards of
27+
acceptable behavior and will take appropriate and fair corrective action in
28+
response to any behavior that they deem inappropriate or harmful.
29+
30+
## Scope
31+
32+
This Code of Conduct applies within all community spaces, and also applies when
33+
an individual is officially representing the community in public spaces.
34+
35+
## Enforcement
36+
37+
Instances of unacceptable behavior may be reported to the project maintainers via
38+
[GitHub Issues](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/issues).
39+
40+
All complaints will be reviewed and investigated promptly and fairly.
41+
42+
## Attribution
43+
44+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
45+
version 2.1, available at
46+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html](https://www.contributor-covenant.org/version/2/1/code_of_conduct.html).

CONTRIBUTING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
# Contributing to Nwpie.Foundation.NetCore.SDK
1+
# Contributing to dotnet-nwpie-foundation-sdk
22

33
Thank you for your interest in contributing! Here's how to get started.
44

55
## Development Setup
66

77
```bash
8-
git clone https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK.git
9-
cd Nwpie.Foundation.NetCore.SDK
8+
git clone https://github.com/osisdie/dotnet-nwpie-foundation-sdk.git
9+
cd dotnet-nwpie-foundation-sdk
1010
dotnet restore
1111
dotnet build
1212
dotnet test
1313
```
1414

15-
**Prerequisites**: .NET 8 SDK
15+
**Prerequisites**: .NET 8 SDK (or later)
1616

1717
## How to Contribute
1818

@@ -35,7 +35,7 @@ build/ # Build scripts and configurations
3535
## Coding Guidelines
3636

3737
- **Library projects** target `netstandard2.1` for broad compatibility
38-
- **Application projects** (endpoints, lambdas) target `net8.0`
38+
- **Application projects** (endpoints, lambdas) multi-target `net8.0` and `net10.0`
3939
- Follow existing naming conventions and code style
4040
- Add unit tests for new functionality
4141
- Keep modules self-contained and loosely coupled
@@ -47,4 +47,4 @@ build/ # Build scripts and configurations
4747

4848
## License
4949

50-
By contributing, you agree that your contributions will be licensed under the [BSD-3-Clause License](LICENSE).
50+
By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE).

Directory.Build.props

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Project>
2+
<PropertyGroup>
3+
<VersionPrefix>1.0.0</VersionPrefix>
4+
<Authors>kevinwu</Authors>
5+
<Copyright>Copyright (c) 2019-2026 Kevin Wu</Copyright>
6+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
7+
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
8+
<PackageProjectUrl>https://github.com/osisdie/dotnet-nwpie-foundation-sdk</PackageProjectUrl>
9+
<RepositoryUrl>https://github.com/osisdie/dotnet-nwpie-foundation-sdk</RepositoryUrl>
10+
<RepositoryType>git</RepositoryType>
11+
</PropertyGroup>
12+
</Project>

LICENSE

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
BSD 3-Clause License
1+
MIT License
22

3-
Copyright (c) 2019-2026, Kevin Wu
3+
Copyright (c) 2019-2026 Kevin Wu
44

5-
Redistribution and use in source and binary forms, with or without
6-
modification, are permitted provided that the following conditions are met:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
711

8-
1. Redistributions of source code must retain the above copyright notice, this
9-
list of conditions and the following disclaimer.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1014

11-
2. Redistributions in binary form must reproduce the above copyright notice,
12-
this list of conditions and the following disclaimer in the documentation
13-
and/or other materials provided with the distribution.
14-
15-
3. Neither the name of the copyright holder nor the names of its
16-
contributors may be used to endorse or promote products derived from
17-
this software without specific prior written permission.
18-
19-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
# Nwpie.Foundation.NetCore.SDK
22

3-
[![.NET](https://img.shields.io/badge/.NET-8%20%7C%2010-blue.svg)](https://dotnet.microsoft.com/download/dotnet)
4-
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](LICENSE)
5-
[![Build](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/actions/workflows/dotnet.yml/badge.svg)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/actions/workflows/dotnet.yml)
6-
[![GitHub stars](https://img.shields.io/github/stars/osisdie/Nwpie.Foundation.NetCore.SDK)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/stargazers)
7-
[![GitHub issues](https://img.shields.io/github/issues/osisdie/Nwpie.Foundation.NetCore.SDK)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/issues)
8-
[![Last commit](https://img.shields.io/github/last-commit/osisdie/Nwpie.Foundation.NetCore.SDK)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/commits/main)
3+
[![.NET](https://img.shields.io/badge/.NET-8%20%7C%2010%20%7C%2011--preview-blue.svg)](https://dotnet.microsoft.com/download/dotnet)
4+
[![NuGet](https://img.shields.io/nuget/v/Nwpie.Foundation.Abstractions.svg)](https://www.nuget.org/packages?q=Nwpie.Foundation)
5+
[![netstandard2.1](https://img.shields.io/badge/netstandard-2.1-blue.svg)](https://docs.microsoft.com/en-us/dotnet/standard/net-standard)
6+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
7+
[![Build](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/actions/workflows/dotnet.yml/badge.svg)](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/actions/workflows/dotnet.yml)
8+
[![Modules](https://img.shields.io/badge/modules-16-green.svg)](#modules-overview)
9+
[![GitHub stars](https://img.shields.io/github/stars/osisdie/dotnet-nwpie-foundation-sdk)](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/stargazers)
10+
[![GitHub issues](https://img.shields.io/github/issues/osisdie/dotnet-nwpie-foundation-sdk)](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/issues)
11+
[![Last commit](https://img.shields.io/github/last-commit/osisdie/dotnet-nwpie-foundation-sdk)](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/commits/main)
912

1013
**Nwpie.Foundation.NetCore.SDK** is a comprehensive, modular SDK built for .NET developers. It simplifies and enhances application development by providing an all-in-one solution with well-defined abstractions, robust utilities, and modularized components. Core libraries target `netstandard2.1` for broad compatibility, while endpoint and test projects multi-target `net8.0` and `net10.0`. Fully supported with unit tests.
1114

1215
## Table of Contents
1316
- [Features](#features)
17+
- [Installation](#installation)
1418
- [Modules Overview](#modules-overview)
1519
- [Quick Start](#quick-start)
1620
- [Getting Started](#getting-started)
@@ -23,13 +27,35 @@
2327
---
2428

2529
## Features
26-
- **Multi-target .NET 8 & .NET 10**: Endpoint and test projects target both `net8.0` and `net10.0`. Core libraries use `netstandard2.1` for broad compatibility.
30+
- **Multi-target .NET 8, .NET 10 & .NET 11 (preview)**: Endpoint and test projects target `net8.0` and `net10.0`. CI also validates against .NET 11 preview. Core libraries use `netstandard2.1` for broad compatibility.
2731
- **Modular SDK**: Use what you need with a modularized structure.
32+
- **NuGet Ready**: Install individual modules via NuGet for easy integration.
2833
- **Comprehensive Tests**: Unit tests demonstrate usage and ensure reliability.
2934
- **Extensive Utilities**: Includes tools for logging, configuration, data access, and more.
3035

3136
---
3237

38+
## Installation
39+
40+
Install individual modules via NuGet:
41+
42+
```bash
43+
dotnet add package Nwpie.Foundation.Abstractions
44+
dotnet add package Nwpie.Foundation.Common
45+
dotnet add package Nwpie.Foundation.Caching.Common
46+
dotnet add package Nwpie.Foundation.Caching.Redis
47+
dotnet add package Nwpie.Foundation.Auth.SDK
48+
dotnet add package Nwpie.Foundation.Http.Common
49+
```
50+
51+
Or search for all available packages:
52+
53+
```bash
54+
dotnet nuget search Nwpie.Foundation
55+
```
56+
57+
---
58+
3359
## Modules Overview
3460
The SDK provides the following modules, located under the `src/` directory:
3561

@@ -103,8 +129,8 @@ See the [samples/](samples/) directory for complete working examples (MiniSite,
103129
Clone the repository to explore the SDK:
104130

105131
```bash
106-
git clone https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK.git
107-
cd Nwpie.Foundation.NetCore.SDK
132+
git clone https://github.com/osisdie/dotnet-nwpie-foundation-sdk.git
133+
cd dotnet-nwpie-foundation-sdk
108134
```
109135

110136
### Explore Modules
@@ -117,7 +143,7 @@ Modules are located in the `src/` directory. For example:
117143
Each module is self-contained and can be used independently or as part of the complete SDK.
118144

119145
### Run Unit Tests
120-
Unit tests demonstrate how to use each module. Tests are located under `test/UnitTest`.
146+
Unit tests demonstrate how to use each module. Tests are located under `tests/UnitTest`.
121147

122148
To run the tests:
123149

@@ -138,9 +164,9 @@ We welcome contributions from the open-source community! See [CONTRIBUTING.md](C
138164
---
139165

140166
## License
141-
This project is licensed under the BSD-3-Clause License. See the [LICENSE](LICENSE) file for details.
167+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
142168

143169
---
144170

145171
## Support
146-
If you encounter any issues or have suggestions, feel free to open an [issue](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/issues) on GitHub.
172+
If you encounter any issues or have suggestions, feel free to open an [issue](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/issues) on GitHub.

SECURITY.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | .NET Target | Supported |
6+
|---------|------------------|--------------------|
7+
| 1.0.x | netstandard2.1 | Yes |
8+
| 1.0.x | net8.0 | Yes |
9+
| 1.0.x | net10.0 | Yes |
10+
| - | net11.0 (preview)| No (preview only) |
11+
12+
## Reporting a Vulnerability
13+
14+
If you discover a security vulnerability in this project, please report it responsibly:
15+
16+
1. **Do NOT open a public GitHub issue** for security vulnerabilities
17+
2. Use [GitHub Security Advisories](https://github.com/osisdie/dotnet-nwpie-foundation-sdk/security/advisories/new) to report privately
18+
3. Alternatively, contact the maintainer directly
19+
20+
### What to expect
21+
22+
- Acknowledgment within 48 hours
23+
- Status update within 7 days
24+
- We will work with you to understand and address the issue
25+
26+
## Security Best Practices
27+
28+
When using this SDK:
29+
30+
- Keep dependencies up to date
31+
- Never commit secrets, API keys, or credentials to source control
32+
- Use the `.env.example` file as a template; store actual secrets in environment variables or a secrets manager
33+
- Review the [CONTRIBUTING.md](CONTRIBUTING.md) for secure development guidelines

samples/MiniSite/ESProxy/Contract/Nwpie.MiniSite.ES.Contract.csproj

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,11 @@
22

33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
5+
<IsPackable>false</IsPackable>
56
<PackageId>Nwpie.MiniSite.ES.Contract</PackageId>
6-
<Authors>kevinwu</Authors>
7-
<License>https://www.freebsd.org/copyright/freebsd-license.html</License>
87
<Description>SDK/Helper/Cloud/Utility</Description>
98
<PackageTags>ES;Contract</PackageTags>
109
<PackageReleaseNotes>Reference Abstractions</PackageReleaseNotes>
11-
<PackageIconUrl>https://cdn.vsassets.io/content/icons/favicon.ico</PackageIconUrl>
12-
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
13-
<RepositoryType>git</RepositoryType>
14-
<VersionPrefix>1.0.0.0</VersionPrefix>
15-
<!--VersionSuffix>preview-0723-2</VersionSuffix-->
1610
</PropertyGroup>
1711

1812
<ItemGroup>

samples/MiniSite/ESProxy/Endpoint/Nwpie.MiniSite.ES.Endpoint.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
5+
<IsPackable>false</IsPackable>
56
<EnableDefaultContentItems>false</EnableDefaultContentItems>
67
</PropertyGroup>
78

0 commit comments

Comments
 (0)