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