Browse Source

[ci] 更新GitHub Actions配置,调整缩进并优化步骤格式

dufu1991 1 năm trước cách đây
mục cha
commit
c5d8f59230
1 tập tin đã thay đổi với 35 bổ sung35 xóa
  1. 35 35
      .github/workflows/publish-create.yml

+ 35 - 35
.github/workflows/publish-create.yml

@@ -3,43 +3,43 @@
 name: PUBLISH CREATE
 
 on:
-  push:
-    branches:
-      - main
-    paths:
-      - 'packages/create-stdf/package.json'
+    push:
+        branches:
+            - main
+        paths:
+            - 'packages/create-stdf/package.json'
 
 jobs:
-  publish:
-    runs-on: ubuntu-latest
-    permissions:
-      id-token: write
-      contents: write
+    publish:
+        runs-on: ubuntu-latest
+        permissions:
+            id-token: write
+            contents: write
 
-    steps:
-      - name: Checkout
-        uses: actions/checkout@v4
+        steps:
+            - name: Checkout
+              uses: actions/checkout@v4
 
-      - name: Setup Node.js environment
-        uses: actions/setup-node@v3
-        with:
-          node-version: 20.x
+            - name: Setup Node.js environment
+              uses: actions/setup-node@v3
+              with:
+                  node-version: 20.x
 
-      # 将 LICENSE 复制到 packages/create-stdf 目录下
-      # cd packages/create-stdf 目录下
-      # 安装依赖 npm install
-      # 打包 npm run build
-      # 执行 npm run update
-      # 发布 create-stdf 到 npm
-      - name: Publish
-        run: |
-          cp LICENSE packages/create-stdf/LICENSE
-          cd packages/create-stdf
-          npm install
-          npm run build
-          npm run update
-          npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
-          npm publish --provenance
-        env:
-          CI: true
-          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+            # 将 LICENSE 复制到 packages/create-stdf 目录下
+            # cd packages/create-stdf 目录下
+            # 安装依赖 npm install
+            # 打包 npm run build
+            # 执行 npm run update
+            # 发布 create-stdf 到 npm
+            - name: Publish
+              run: |
+                  cp LICENSE packages/create-stdf/LICENSE
+                  cd packages/create-stdf
+                  npm install
+                  npm run build
+                  npm run update
+                  npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
+                  npm publish --provenance
+              env:
+                  CI: true
+                  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}