mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
on:
|
|
push:
|
|
# Sequence of patterns matched against refs/tags
|
|
tags:
|
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
|
|
|
name: Create Release
|
|
permissions: write-all
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Install dependencies
|
|
run: npm install -g conventional-changelog-cli
|
|
|
|
- name: Find last tag
|
|
id: last_tag
|
|
run: echo "::set-output name=tag::$(git describe --tags --abbrev=0 || echo 'v0.0.0')"
|
|
|
|
- name: Generate changelog since last tag
|
|
run: |
|
|
conventional-changelog -p angular -i CHANGELOG.md -s -r ${{ steps.last_tag.outputs.tag }}..HEAD
|
|
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.TOKEN }}
|
|
with:
|
|
tag_name: ${{ steps.last_tag.outputs.tag }}
|
|
release_name: Release ${{ steps.last_tag.outputs.tag }}
|
|
body_path: CHANGELOG.md
|
|
draft: false
|
|
prerelease: false |