Преглед на файлове

【维护】更新 GitHub Actions 发布流程

- 新增文件复制步骤,将生成的 HTML 文件复制到 release 目录
- 修改 artifacts 参数,使用绝对路径指定发布文件位置
- 优化发布流程,确保正确打包和发布生成的文件
PJ568 преди 1 година
родител
ревизия
d2e29f5aee
променени са 1 файла, в които са добавени 10 реда и са изтрити 1 реда
  1. 10 1
      .github/workflows/release.yml

+ 10 - 1
.github/workflows/release.yml

@@ -60,10 +60,19 @@ jobs:
       shell: bash
       working-directory: ${{ github.action_path }}
 
+    - name: Copy files
+      if: steps.version-check.outputs.version != '0'
+      run: |
+        mkdir -p ../release
+        cp -v ${{ github.action_path }}/index.html ../release/
+        cp -v ${{ github.action_path }}/index.min.html ./release/
+      shell: bash
+      working-directory: ${{ github.action_path }}
+
     - name: Create release
       if: steps.version-check.outputs.version != '0'
       uses: ncipollo/release-action@v1
       with:
         generateReleaseNotes: true
         tag: "v${{ steps.version-check.outputs.version }}"
-        artifacts: "index.html,index.min.html"
+        artifacts: "${{ github.action_path }}/index.html,${{ github.action_path }}/index.min.html"