ci: 修改 release
parent
0c562165c9
commit
f5db1102ce
|
@ -2,6 +2,8 @@ name: Deploy Docs
|
|||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- docs
|
||||
workflow_dispatch:
|
||||
|
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
name: Release ${{ github.ref }}
|
||||
prerelease: ${{ steps.prerelease.outputs.result }}
|
||||
body_path: 'RELEASELOG.md'
|
||||
files: 'dist/**.zip'
|
||||
|
|
|
@ -5,7 +5,7 @@ import { getPkgJSON, resolve } from './utils';
|
|||
const changelogPath = resolve('CHANGELOG.md');
|
||||
const releaselogPath = resolve('RELEASELOG.md');
|
||||
const { version } = getPkgJSON();
|
||||
const versionRE = new RegExp(`^# \\[?${version}\\]?[ (]`);
|
||||
const versionRE = new RegExp(`^#{1,2} \\[?${version}\\]?\\(?`);
|
||||
|
||||
main();
|
||||
|
||||
|
@ -17,7 +17,7 @@ async function main() {
|
|||
|
||||
let releaselog = '';
|
||||
for await (const line of changelog) {
|
||||
if (line.startsWith('# ') && !versionRE.test(line)) {
|
||||
if (/^#{1,2} /.test(line) && !versionRE.test(line)) {
|
||||
break;
|
||||
}
|
||||
releaselog += `${line}\n`;
|
||||
|
|
Loading…
Reference in New Issue