diff --git a/.github/workflows/main.user.js_version_update.yaml b/.github/workflows/main.user.js_version_update.yaml index a82d05f4c..1eb822482 100644 --- a/.github/workflows/main.user.js_version_update.yaml +++ b/.github/workflows/main.user.js_version_update.yaml @@ -20,12 +20,16 @@ jobs: if [ ! "$(git tag --contains ${{ github.sha }})" ]; then # 获得最近以`main.user.js Update to version`开头的提交的sha release_commit_sha=$(git log --grep="^main.user.js Update to version" -n 1 --pretty=format:"%H") + git log --grep="^main.user.js Update to version" -n 1 --pretty=format:"%H" # 对应的时间戳 release_commit_timestamp=$(git show -s --format=%ct $release_commit_sha) + git show -s --format=%ct $release_commit_sha # 最近的tag的时间戳 latest_tag_commit_sha=$(git rev-list --tags --max-count=1) + git rev-list --tags --max-count=1 latest_tag_commit_timestamp=$(git show -s --format=%ct $latest_tag_commit_sha) + git show -s --format=%ct $latest_tag_commit_sha echo "release_commit_sha=$release_commit_sha" echo "release_commit_timestamp=$release_commit_timestamp"