From 4839366227001b6a52a525b32aedb17c4f13be36 Mon Sep 17 00:00:00 2001 From: movingsam Date: Sun, 1 Mar 2026 17:10:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(plugin):=20=E6=B7=BB=E5=8A=A0=20NuGet=20?= =?UTF-8?q?=E5=8C=85=E5=8F=91=E5=B8=83=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加包元数据到 csproj - 创建 nuget.yml 发布工作流 --- .gitea/workflows/nuget.yml | 40 +++++++++++++++++++ ...engling.Gateway.Plugin.Abstractions.csproj | 8 ++++ 2 files changed, 48 insertions(+) create mode 100644 .gitea/workflows/nuget.yml diff --git a/.gitea/workflows/nuget.yml b/.gitea/workflows/nuget.yml new file mode 100644 index 0000000..d21ddda --- /dev/null +++ b/.gitea/workflows/nuget.yml @@ -0,0 +1,40 @@ +name: Build and Publish NuGet Package + +on: + push: + branches: [main] + paths: + - 'src/Fengling.Gateway.Plugin.Abstractions/**' + release: + types: [published] + +env: + REGISTRY: gitea.shtao1.cn + PACKAGE_NAME: Fengling.Gateway.Plugin.Abstractions + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '10.0.103' + + - name: Restore dependencies + run: dotnet restore src/Fengling.Gateway.Plugin.Abstractions/Fengling.Gateway.Plugin.Abstractions.csproj + + - name: Build + run: dotnet build src/Fengling.Gateway.Plugin.Abstractions/Fengling.Gateway.Plugin.Abstractions.csproj --configuration Release --no-restore + + - name: Pack + run: dotnet pack src/Fengling.Gateway.Plugin.Abstractions/Fengling.Gateway.Plugin.Abstractions.csproj --configuration Release --no-build -o ./nupkg + + - name: Publish to Gitea + run: | + dotnet nuget push ./nupkg/*.nupkg \ + --source ${{ env.REGISTRY }}/api/packages/${{ github.repository_owner }}/nuget/index.json \ + --username fengling \ + --password ${{ secrets.GITEATOKEN }} diff --git a/src/Fengling.Gateway.Plugin.Abstractions/Fengling.Gateway.Plugin.Abstractions.csproj b/src/Fengling.Gateway.Plugin.Abstractions/Fengling.Gateway.Plugin.Abstractions.csproj index 0c5abb0..0717594 100644 --- a/src/Fengling.Gateway.Plugin.Abstractions/Fengling.Gateway.Plugin.Abstractions.csproj +++ b/src/Fengling.Gateway.Plugin.Abstractions/Fengling.Gateway.Plugin.Abstractions.csproj @@ -5,6 +5,14 @@ enable enable Fengling.Gateway.Plugin.Abstractions + + + Fengling.Gateway.Plugin.Abstractions + 1.0.0 + Fengling + Fengling + Fengling Gateway Plugin + Gateway plugin abstractions for YARP reverse proxy