From 2abc87af8a93efb60c0de1c3fabf6aa8bb6ed70d Mon Sep 17 00:00:00 2001 From: movingsam Date: Sun, 1 Mar 2026 00:31:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=90=88=E5=B9=B6=20CI=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E5=B9=B6=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/nuget.yml | 35 ++++++++++++++---------------- .gitea/workflows/publish-nuget.yml | 26 ---------------------- 2 files changed, 16 insertions(+), 45 deletions(-) delete mode 100644 .gitea/workflows/publish-nuget.yml diff --git a/.gitea/workflows/nuget.yml b/.gitea/workflows/nuget.yml index 5a7f4d1..42914ed 100644 --- a/.gitea/workflows/nuget.yml +++ b/.gitea/workflows/nuget.yml @@ -4,34 +4,31 @@ on: push: branches: [main] tags: - - "v*" + - 'v*' env: GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} GITEA_URL: https://gitea.shtao1.cn jobs: - build: + publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - + - name: Checkout code + 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.Platform.Domain/Fengling.Platform.Domain.csproj -c Release -o ./packages - - - name: Pack Infrastructure - if: startsWith(github.ref, 'refs/tags/v') - run: dotnet pack Fengling.Platform.Infrastructure/Fengling.Platform.Infrastructure.csproj -c Release -o ./packages - - - name: Push to Gitea - if: startsWith(github.ref, 'refs/tags/v') + dotnet-version: '10.0' + + - name: Clean nuget cache + run: dotnet nuget locals all --clear + + - name: Publish NuGet packages run: | - for pkg in ./packages/*.nupkg; do - dotnet nuget push "$pkg" --source "$GITEA_URL/gitea_registry/fengling/go/__index" --skip-duplicate - done \ No newline at end of file + ./push-platform-nuget.sh all + env: + GITEA_HOST: gitea.shtao1.cn + GITEA_ORG: fengling + GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }} diff --git a/.gitea/workflows/publish-nuget.yml b/.gitea/workflows/publish-nuget.yml deleted file mode 100644 index e21d800..0000000 --- a/.gitea/workflows/publish-nuget.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Publish NuGet Package - -on: - push: - tags: - - 'v*' - -jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '10.0' - - - name: Publish NuGet packages - run: | - ./push-platform-nuget.sh all - env: - GITEA_HOST: gitea.shtao1.cn - GITEA_ORG: fengling - GITEA_API_TOKEN: ${{ secrets.GITEA_TOKEN }}