From f89b14ea7d808203b4bd90a7e5c8f7b876d9cf85 Mon Sep 17 00:00:00 2001 From: xRain Date: Tue, 31 Mar 2026 06:44:36 +0800 Subject: [PATCH] fix: remove environment --- .github/workflows/publish.yml | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 138ada6..d1c13f2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,17 +9,12 @@ on: jobs: publish: runs-on: ubuntu-latest - environment: release # npm Trusted Publisher 环境 - - permissions: - id-token: write # OIDC 认证 - contents: read # 读取仓库 steps: - name: Checkout uses: actions/checkout@v4 with: - fetch-depth: 0 # 完整 history 用于版本分析 + fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v4 @@ -27,7 +22,6 @@ jobs: node-version: '20' registry-url: 'https://registry.npmjs.org' - # 从 tag 提取版本号 - name: Get version from tag id: version run: | @@ -35,10 +29,8 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "Package version: $VERSION" - # 修改 package.json 版本号 - name: Update package.json version - run: | - npm pkg set version=${{ steps.version.outputs.version }} + run: npm pkg set version=${{ steps.version.outputs.version }} - name: Install dependencies run: npm ci @@ -46,7 +38,6 @@ jobs: - name: Build run: npm run build - # Trusted Publisher 发布(无需 token) - name: Publish to npm run: npm publish --access public @@ -57,6 +48,5 @@ jobs: ## @simcu/simapi v${{ steps.version.outputs.version }} See [changelog](https://github.com/simcu/simapi-vue/releases) for details. - draft: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}