Skip to content

Commit 0225df4

Browse files
committed
build: 更新依赖项和构建配置
1 parent 0b4b161 commit 0225df4

File tree

5 files changed

+67
-9
lines changed

5 files changed

+67
-9
lines changed

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: '10.0.x'
22+
cache: true
23+
24+
- name: Compute version from tag
25+
shell: bash
26+
run: |
27+
VERSION="${GITHUB_REF_NAME#v}"
28+
echo "VERSION=${VERSION}" >> $GITHUB_ENV
29+
30+
- name: Restore
31+
run: dotnet restore
32+
33+
- name: Build and Pack
34+
run: |
35+
dotnet pack src/NuoNuoSdk/NuoNuoSdk.csproj -c Release -p:Version=${{ env.VERSION }} -p:IsPackable=true -o artifacts/nuget
36+
37+
- name: Upload artifacts
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: nuget-packages
41+
path: |
42+
artifacts/nuget/*.nupkg
43+
artifacts/nuget/*.snupkg
44+
45+
- name: Create GitHub Release
46+
uses: softprops/action-gh-release@v2
47+
with:
48+
tag_name: ${{ github.ref_name }}
49+
name: NuoNuoOpenSdk v${{ env.VERSION }}
50+
files: |
51+
artifacts/nuget/*.nupkg
52+
artifacts/nuget/*.snupkg
53+
54+
- name: Publish to NuGet.org
55+
env:
56+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
57+
run: |
58+
dotnet nuget push artifacts/nuget/*.nupkg --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate
59+
dotnet nuget push artifacts/nuget/*.snupkg --source https://api.nuget.org/v3/index.json --api-key "$NUGET_API_KEY" --skip-duplicate

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# NuoNuoSdk [![NuoNuoOpenSdk](https://img.shields.io/nuget/v/NuoNuoOpenSdk.svg)](https://www.nuget.org/packages/NuoNuoOpenSdk/) [![NuoNuoOpenSdk](https://img.shields.io/nuget/dt/NuoNuoOpenSdk.svg)](https://www.nuget.org/packages/NuoNuoOpenSdk/)
22

3-
[诺诺开放平台](https://open.jss.com.cn/)SDK - 支持 .NET 6/7/8/9
3+
[诺诺开放平台](https://open.jss.com.cn/)SDK - 支持 .NET 8/9/10
44

55
## ✨ 特性
66

77
- 🚀 **开箱即用**:使用强类型模型参数,无需手动拼接参数
8-
- 🎯 **多版本支持**支持 .NET 6、.NET 7、.NET 8、.NET 9
8+
- 🎯 **多版本支持**:.NET 8、.NET 9、.NET 10
99
- 🔧 **依赖注入**:完美集成 ASP.NET Core 依赖注入容器
1010
- 📝 **完整文档**:提供详细的 XML 文档注释
1111
- 🛡️ **类型安全**:强类型请求和响应模型

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<PropertyGroup>
33
<LangVersion>13.0</LangVersion>
4-
<IsPackable>false</IsPackable>
4+
<IsPackable Condition="'$(IsPackable)' == ''">false</IsPackable>
55
<NoWarn>CS1591;NETSDK1138</NoWarn>
66
</PropertyGroup>
77
</Project>

src/NuoNuoSdk/NuoNuoSdk.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
<EmbedUntrackedSources>true</EmbedUntrackedSources>
1515
<PackageOutputPath>nupkgs</PackageOutputPath>
1616
<IsPackable>true</IsPackable>
17-
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0</TargetFrameworks>
17+
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
1818
<ImplicitUsings>enable</ImplicitUsings>
19-
<Version>1.1.0</Version>
2019
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
2120
<Copyright>MIT</Copyright>
2221
<PackageIcon>icon.png</PackageIcon>
@@ -39,9 +38,9 @@
3938
</ItemGroup>
4039

4140
<ItemGroup>
42-
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="9.0.0" />
43-
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.0" />
44-
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
41+
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="10.0.0" />
42+
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.0" />
43+
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
4544
</ItemGroup>
4645

4746

src/Sample/Sample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.0.0" />
10+
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.0.1" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

0 commit comments

Comments
 (0)