更新workflow中涉及读取updateLog的部分

This commit is contained in:
MrZ_26
2023-11-14 21:47:50 +08:00
parent edb79e8156
commit a2931ea290

View File

@@ -39,7 +39,9 @@ jobs:
os.execute('echo "version-string=' .. version.string:gsub("%a", "") .. '" >> $GITHUB_OUTPUT')
os.execute('echo "version-code=' .. tostring(version.code) .. '" >> $GITHUB_OUTPUT')
local note = require 'parts.updateLog'
local f = io.open("updateLog.txt", 'r')
local note = f and f:read("*a") or ""
if f then f:close() end
local p1 = note:find("\n%d") + 1
local p2 = note:find("\n", p1) - 1
os.execute('echo "update-title=' .. note:sub(p1, p2) .. '" >> $GITHUB_OUTPUT')