Skip to content

fenglekai/less-write-changelog

Repository files navigation

Less Write Changelog

Custom preset for conventional-changelog

  • gulp workflow
  • rollup+esbuild building

特征

  • 集成ESModule构建
  • 轻量的预设生成changelog/release文档

快速开始

npx less-write-changelog
# 将生成RELEASE.md与CHANGELOG.md文件

在github action 中使用

name: Release

on:
  push:
    tags:
      - "v*"
  workflow_dispatch:

permissions:
  contents: write
  id-token: write

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          ref: ${{ github.ref }}
          fetch-depth: 0

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20

      - name: Gen release file
        run: |
          npx less-write-changelog

      - name: Release to Github
        uses: softprops/action-gh-release@v2
        with:
          token: ${{ github.token }}
          body_path: RELEASE.md
          files: |
            RELEASE.md
            CHANGELOG.md