Browse Source

【修复】使用最新版本生成文件名

- 移除了获取版本的步骤,直接使用最新版本
- 更新了 index.html 版本号到 1.17.6
- 修改了 get-version.bash 脚本,支持传入文件路径参数
PJ568 1 năm trước cách đây
mục cha
commit
f1d6f9c38f
3 tập tin đã thay đổi với 7 bổ sung và 16 xóa
  1. 1 14
      action.yml
  2. 1 1
      index.html
  3. 5 1
      scripts/get-version.bash

+ 1 - 14
action.yml

@@ -20,19 +20,6 @@ runs:
   using: "composite"
   steps:
 
-    - name: Get version
-      id: version-get
-      run: |
-        chmod +x ./scripts/get-version.bash
-        VERSION=$(./scripts/get-version.bash)
-        echo "version=${VERSION}" >> $GITHUB_OUTPUT
-        if [ "$VERSION" != "0" ]; then
-          echo "Version detected: $VERSION"
-        else
-          echo "No version detacted"
-        fi
-      shell: bash
-
     - name: Generate file name
       run: |
         USE_ALL_IN_ONE=""
@@ -50,7 +37,7 @@ runs:
       uses: robinraju/release-downloader@v1
       with:
         repository: 'PJ-568/MAKRDOWN.HTML'
-        tag: ${{ steps.version-get.outputs.version }}
+        latest: true
         fileName: ${{ steps.file-name.outputs.file_name }}
         tarBall: false
         zipBall: false

+ 1 - 1
index.html

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

+ 5 - 1
scripts/get-version.bash

@@ -7,7 +7,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 ## 仓库目录 | Repository Directory
 REPO_DIR="$(dirname "$SCRIPT_DIR")"
 ## 文件路径 | File Path
-FILE_PATH="$REPO_DIR/index.html"
+if [ -n "$1" ]; then
+  FILE_PATH="$1"
+else
+  FILE_PATH="$REPO_DIR/index.html"
+fi
 ## 当前语言 | Current Language
 CURRENT_LANG=0 ### 0: en-US, 1: zh-Hans-CN