Skip to content

Commit f1d6f9c

Browse files
committed
【修复】使用最新版本生成文件名
- 移除了获取版本的步骤,直接使用最新版本 - 更新了 index.html 版本号到 1.17.6 - 修改了 get-version.bash 脚本,支持传入文件路径参数
1 parent 1798df7 commit f1d6f9c

3 files changed

Lines changed: 7 additions & 16 deletions

File tree

action.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,6 @@ runs:
2020
using: "composite"
2121
steps:
2222

23-
- name: Get version
24-
id: version-get
25-
run: |
26-
chmod +x ./scripts/get-version.bash
27-
VERSION=$(./scripts/get-version.bash)
28-
echo "version=${VERSION}" >> $GITHUB_OUTPUT
29-
if [ "$VERSION" != "0" ]; then
30-
echo "Version detected: $VERSION"
31-
else
32-
echo "No version detacted"
33-
fi
34-
shell: bash
35-
3623
- name: Generate file name
3724
run: |
3825
USE_ALL_IN_ONE=""
@@ -50,7 +37,7 @@ runs:
5037
uses: robinraju/release-downloader@v1
5138
with:
5239
repository: 'PJ-568/MAKRDOWN.HTML'
53-
tag: ${{ steps.version-get.outputs.version }}
40+
latest: true
5441
fileName: ${{ steps.file-name.outputs.file_name }}
5542
tarBall: false
5643
zipBall: false

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!doctype html>
22

33
<html>
4-
<markdown-html version="1.17.5" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
4+
<markdown-html version="1.17.6" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
55
license="CC BY-SA 4.0 International"></markdown-html>
66

77
<head>

scripts/get-version.bash

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
77
## 仓库目录 | Repository Directory
88
REPO_DIR="$(dirname "$SCRIPT_DIR")"
99
## 文件路径 | File Path
10-
FILE_PATH="$REPO_DIR/index.html"
10+
if [ -n "$1" ]; then
11+
FILE_PATH="$1"
12+
else
13+
FILE_PATH="$REPO_DIR/index.html"
14+
fi
1115
## 当前语言 | Current Language
1216
CURRENT_LANG=0 ### 0: en-US, 1: zh-Hans-CN
1317

0 commit comments

Comments
 (0)