Skip to content

Commit aa0b987

Browse files
committed
修复action
1 parent b5e3a67 commit aa0b987

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,14 @@ jobs:
9191
script: |
9292
const owner = context.repo.owner;
9393
const repo = context.repo.repo;
94-
const tag = context.ref_name;
94+
let tag = context.ref_name || '';
95+
if ((!tag || !tag.length) && context.ref && context.ref.startsWith('refs/tags/')) {
96+
tag = context.ref.substring('refs/tags/'.length);
97+
}
98+
if (!tag || !tag.length) {
99+
core.setFailed('无法解析当前构建对应的 tag 名称。');
100+
return;
101+
}
95102
const patterns = [
96103
/latest\.json$/,
97104
/_x64-setup\.exe$/,

0 commit comments

Comments
 (0)