Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit 0b61cb6

Browse files
committed
chore(release): Use Github Action for Changelog
1 parent 52e643b commit 0b61cb6

File tree

3 files changed

+26
-59
lines changed

3 files changed

+26
-59
lines changed

.github/workflows/deploy.yml

+26-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Deploy
22

33
on:
44
push:
5-
branches:
6-
- main
5+
tags:
6+
- v[0-9]+.[0-9]+.[0-9]+
77

88
jobs:
99
deploy:
@@ -30,6 +30,30 @@ jobs:
3030

3131
- run: pnpm docs:build
3232

33+
- name: Update CHANGELOG
34+
id: changelog
35+
uses: requarks/changelog-action@v1
36+
with:
37+
token: ${{ secrets.GITHUB_TOKEN }}
38+
tag: ${{ github.ref_name }}
39+
40+
- name: Create Release
41+
uses: ncipollo/release-action@v1.12.0
42+
with:
43+
allowUpdates: true
44+
draft: false
45+
makeLatest: true
46+
name: ${{ github.ref_name }}
47+
body: ${{ steps.changelog.outputs.changes }}
48+
token: ${{ github.token }}
49+
50+
- name: Commit CHANGELOG.md
51+
uses: stefanzweifel/git-auto-commit-action@v4
52+
with:
53+
branch: main
54+
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
55+
file_pattern: CHANGELOG.md
56+
3357
- name: Deploy
3458
uses: peaceiris/actions-gh-pages@v3
3559
with:

changelog/config.ts

-55
This file was deleted.

package.json

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"docs:dev": "vitepress dev docs",
3636
"docs:build": "vitepress build docs",
3737
"docs:serve": "vitepress serve docs",
38-
"changelog": "conventional-changelog -p conventionalcommits -i CHANGELOG.md -s -r 0 -n changelog/config.ts"
3938
},
4039
"build": {
4140
"failOnWarn": false
@@ -57,7 +56,6 @@
5756
"@unocss/nuxt": "^0.55.3",
5857
"@vueuse/nuxt": "^10.4.0",
5958
"anu-vue": "^0.15.2",
60-
"conventional-changelog-cli": "^3.0.0",
6159
"defu": "^6.1.2",
6260
"eslint": "^8.48.0",
6361
"markdown-it": "^13.0.1",

0 commit comments

Comments
 (0)