From bc5083d4d9fff3f34775086aa4879d7c6a76ee9a Mon Sep 17 00:00:00 2001 From: movingsam Date: Thu, 26 Feb 2026 10:57:50 +0800 Subject: [PATCH] Add NuGet CI workflow --- .gitea/workflows/nuget.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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..5b1de0c --- /dev/null +++ b/.gitea/workflows/nuget.yml @@ -0,0 +1,33 @@ +name: Publish RiskControl NuGet Packages + +on: + push: + branches: [main] + tags: + - "v*" + +env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + GITEA_URL: https://gitea.shtao1.cn + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "10.0.x" + + - name: Pack Domain + if: startsWith(github.ref, "refs/tags/v") + run: dotnet pack fengling-risk-control/Fengling.RiskControl.Domain/Fengling.RiskControl.Domain.csproj -c Release -o ./packages + + - name: Push to Gitea + if: startsWith(github.ref, "refs/tags/v") + run: | + for pkg in ./packages/*.nupkg; do + dotnet nuget push "$pkg" --source "$GITEA_URL/gitea_registry/movingsam/go/__index" --skip-duplicate + done \ No newline at end of file