From 1e092c07d3135be79b35d256a2c2bec33f50997a Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sun, 5 Apr 2026 20:23:16 +0800 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=E6=9B=B4=E6=96=B0=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E5=B7=A5=E4=BD=9C=E6=B5=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 .NET 10.0 环境设置步骤 - 将密码参数从 secrets.GITHUB_TOKEN 替换为 github.token - 将环境变量中的 secrets.GITHUB_TOKEN 替换为 github.token --- .github/workflows/publish.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b2610615..a92a62c1 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -103,6 +103,11 @@ jobs: id-token: write steps: + - name: Setup .NET + uses: actions/setup-dotnet@v5 + with: + dotnet-version: 10.0.x + - name: Download package artifacts uses: actions/download-artifact@v5 with: @@ -171,7 +176,7 @@ jobs: dotnet nuget add source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ --name github \ --username "${{ github.repository_owner }}" \ - --password "${{ secrets.GITHUB_TOKEN }}" \ + --password "${{ github.token }}" \ --store-password-in-clear-text - name: Push all packages to GitHub Packages @@ -241,4 +246,4 @@ jobs: sbom-spdx-validation.txt sbom-cyclonedx-validation.txt env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }}