From 26e394919b2996461e604695c74f6128f4373907 Mon Sep 17 00:00:00 2001 From: Suntion <149924916+SunYanbox@users.noreply.github.com> Date: Tue, 14 Apr 2026 01:36:05 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix(project):=20=E6=B8=85=E7=90=86=20Rider?= =?UTF-8?q?=20=E8=87=AA=E5=8A=A8=E6=B7=BB=E5=8A=A0=E7=9A=84=E5=86=97?= =?UTF-8?q?=E4=BD=99=20.user=20=E6=96=87=E4=BB=B6=E9=85=8D=E7=BD=AE=20-=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98:=20=E7=A7=BB=E9=99=A4=20ID?= =?UTF-8?q?E=20=E8=87=AA=E5=8A=A8=E7=94=9F=E6=88=90=E7=9A=84=E6=97=A0?= =?UTF-8?q?=E6=95=88=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E5=BC=95=E7=94=A8?= =?UTF-8?q?=20=20=20*=20=E5=88=A0=E9=99=A4=20SuntionCore.SPTExtensions.csp?= =?UTF-8?q?roj=20=E4=B8=AD=20`SuntionCore.SPTExtensions.user`=20=E5=92=8C?= =?UTF-8?q?=20`SuntionCore.csproj.user`=20=E7=9A=84=20``=20?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=20=20=20*=20=E6=B8=85=E7=90=86=20SuntionCore?= =?UTF-8?q?.csproj=20=E4=B8=AD=20`SuntionCore.csproj.user`=20=E7=9A=84?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=20``=20=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj | 7 ------- SuntionCore/SuntionCore.csproj | 5 ----- 2 files changed, 12 deletions(-) diff --git a/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj b/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj index 18d5fba..4029870 100644 --- a/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj +++ b/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj @@ -64,13 +64,6 @@ - - - - - - - diff --git a/SuntionCore/SuntionCore.csproj b/SuntionCore/SuntionCore.csproj index 3523919..32aec0f 100644 --- a/SuntionCore/SuntionCore.csproj +++ b/SuntionCore/SuntionCore.csproj @@ -59,11 +59,6 @@ - - - - - From d112dfe366b57aeaf1a172f1d1d47a55a6566ee9 Mon Sep 17 00:00:00 2001 From: Suntion <149924916+SunYanbox@users.noreply.github.com> Date: Tue, 14 Apr 2026 01:37:05 +0800 Subject: [PATCH 2/3] =?UTF-8?q?build(core):=20=E9=85=8D=E7=BD=AE=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=85=83=E6=95=B0=E6=8D=AE=E4=BB=A5=E6=94=AF=E6=8C=81?= =?UTF-8?q?=20NuGet=20=E6=89=93=E5=8C=85=20-=20=E6=96=B0=E5=A2=9E=E5=8A=9F?= =?UTF-8?q?=E8=83=BD:=20=E4=B8=BA=E6=A0=B8=E5=BF=83=E5=BA=93=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E6=B7=BB=E5=8A=A0=20NuGet=20=E5=8C=85=E5=85=83?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20=20=20*=20SuntionCore.csproj=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20PackageId,=20Authors=20=E5=92=8C=20Company=20?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=20=20=20*=20SuntionCore.SPTExtensions.csproj?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=20PackageId,=20Authors=20=E5=92=8C=20Comp?= =?UTF-8?q?any=20=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj | 3 +++ SuntionCore/SuntionCore.csproj | 3 +++ 2 files changed, 6 insertions(+) diff --git a/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj b/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj index 4029870..42d929e 100644 --- a/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj +++ b/SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj @@ -7,6 +7,9 @@ enable Library false + SuntionCore.SPTExtensions + Suntion + Suntion 1.0.0 bin\$(Configuration)\$(ProjectName)\$(AssemblyName)\ diff --git a/SuntionCore/SuntionCore.csproj b/SuntionCore/SuntionCore.csproj index 32aec0f..9be3edc 100644 --- a/SuntionCore/SuntionCore.csproj +++ b/SuntionCore/SuntionCore.csproj @@ -7,6 +7,9 @@ enable Library false + SuntionCore + Suntion + Suntion 1.2.0 bin\$(Configuration)\$(ProjectName)\$(AssemblyName)\ From bf151042f5753289400369e043641cd0d6a6a900 Mon Sep 17 00:00:00 2001 From: Suntion <149924916+SunYanbox@users.noreply.github.com> Date: Tue, 14 Apr 2026 01:40:59 +0800 Subject: [PATCH 3/3] refactor(publish) publish workflow for NuGet packages Refactor GitHub Actions workflow for building and publishing NuGet packages. Consolidate jobs and update steps for improved clarity and functionality. use `nuget-org/trusted-publishing` --- .github/workflows/publish.yml | 122 +++++++--------------------------- 1 file changed, 23 insertions(+), 99 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9b321be..1d4f04d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,105 +4,29 @@ on: branches: - master jobs: - publish_suntion: - name: build, pack & publish + build-and-publish: runs-on: ubuntu-latest + permissions: + id-token: write # enable GitHub OIDC token issuance for this job + steps: - - uses: actions/checkout@v6.0.2 - - # - name: Setup dotnet - # uses: actions/setup-dotnet@v1.5.0 - # with: - # dotnet-version: 3.1.200 - - # Publish - - name: publish on version change for SuntionCore - id: publish_nuget - uses: brandedoutcast/publish-nuget@v2.5.5 + # Build your artifacts/my-sdk.nupkg package here + - name: Pack specific projects + run: | + dotnet pack SuntionCore/SuntionCore.csproj -c Release -o artifacts + dotnet pack SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj -c Release -o artifacts + + # Get a short-lived NuGet API key + - name: NuGet login (OIDC → temp API key) + uses: NuGet/login@v1 + id: login with: - # Filepath of the project to be packaged, relative to root of repository - PROJECT_FILE_PATH: SuntionCore/SuntionCore.csproj - - # Configuration to build and package - BUILD_CONFIGURATION: Release - - # Platform target to compile (default is empty/AnyCPU) - # BUILD_PLATFORM: x64 - - # NuGet package id, used for version detection & defaults to project name - # PACKAGE_NAME: Core - - # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH - # VERSION_FILE_PATH: Directory.Build.props - - # Regex pattern to extract version info in a capturing group - # VERSION_REGEX: ^\s*(.*)<\/Version>\s*$ - - # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX - # VERSION_STATIC: 1.0.0 - - # Flag to toggle git tagging, enabled by default - # TAG_COMMIT: true - - # Format of the git tag, [*] gets replaced with actual version - # TAG_FORMAT: v* - - # API key to authenticate with NuGet server - # NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - # NuGet server uri hosting the packages, defaults to https://api.nuget.org - # NUGET_SOURCE: https://api.nuget.org - - # Flag to toggle pushing symbols along with nuget package to the server, disabled by default - # INCLUDE_SYMBOLS: false - publish_suntion_extensions: - name: build, pack & publish - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6.0.2 - - # - name: Setup dotnet - # uses: actions/setup-dotnet@v1.5.0 - # with: - # dotnet-version: 3.1.200 - - # Publish - - name: publish on version change for SuntionCore.SPTExtensions - id: publish_nuget - uses: brandedoutcast/publish-nuget@v2.5.5 - with: - # Filepath of the project to be packaged, relative to root of repository - PROJECT_FILE_PATH: SuntionCore.SPTExtensions/SuntionCore.SPTExtensions.csproj - - # Configuration to build and package - BUILD_CONFIGURATION: Release - - # Platform target to compile (default is empty/AnyCPU) - # BUILD_PLATFORM: x64 - - # NuGet package id, used for version detection & defaults to project name - # PACKAGE_NAME: Core - - # Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH - # VERSION_FILE_PATH: Directory.Build.props - - # Regex pattern to extract version info in a capturing group - # VERSION_REGEX: ^\s*(.*)<\/Version>\s*$ - - # Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX - # VERSION_STATIC: 1.0.0 - - # Flag to toggle git tagging, enabled by default - # TAG_COMMIT: true - - # Format of the git tag, [*] gets replaced with actual version - # TAG_FORMAT: v* - - # API key to authenticate with NuGet server - # NUGET_KEY: ${{secrets.NUGET_API_KEY}} - - # NuGet server uri hosting the packages, defaults to https://api.nuget.org - # NUGET_SOURCE: https://api.nuget.org - - # Flag to toggle pushing symbols along with nuget package to the server, disabled by default - # INCLUDE_SYMBOLS: false + user: contoso-bot # Recommended: use a secret like ${{ secrets.NUGET_USER }} for your nuget.org username (profile name), NOT your email address + + # Push the package + - name: NuGet push with wildcard + run: | + # 推送所有 SuntionCore 相关包 + dotnet nuget push "artifacts/SuntionCore*.nupkg" --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json --skip-duplicate + # - name: NuGet push + # run: dotnet nuget push artifacts/my-sdk.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json