Browse Source

【修复】添加重命名文件步骤

- 在 action.yml 中增加了一个新的步骤,用于重命名文件
- 使用 mv 命令将文件从自动生成的名称重命名为用户指定的名称
- 这个改动解决了文件名大小写敏感的问题,提高了跨平台兼容性
PJ568 1 year ago
parent
commit
077190764b
2 changed files with 6 additions and 1 deletions
  1. 5 0
      action.yml
  2. 1 1
      index.html

+ 5 - 0
action.yml

@@ -56,6 +56,11 @@ runs:
         zipBall: false
         out-file-path: ${{ inputs.target-dir }}
 
+    - name: Rename file
+      run: |
+        mv $GITHUB_WORKSPACE/${{ steps.file-name.outputs.file_name }} $GITHUB_WORKSPACE/${{ inputs.file-name }}
+      shell: bash
+
 branding:
   icon: 'book-open'
   color: 'green'

+ 1 - 1
index.html

@@ -1,7 +1,7 @@
 <!doctype html>
 
 <html>
-<markdown-html version="1.17.4" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
+<markdown-html version="1.17.5" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
   license="CC BY-SA 4.0 International"></markdown-html>
 
 <head>