ci: 修改 release

pull/49/head
zjx0905 2023-04-26 09:57:28 +08:00
parent 0c562165c9
commit f5db1102ce
3 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,8 @@ name: Deploy Docs
on:
push:
tags:
- v*
branches:
- docs
workflow_dispatch:

View File

@ -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'

View File

@ -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`;