Skip to content

Commit

Permalink
feat(changelog): Add Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
sfxcode committed Aug 28, 2023
1 parent f87ad1d commit 58312fb
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
tags:
- v[0-9]+.[0-9]+.[0-9]+


jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -17,13 +16,6 @@ jobs:
with:
version: 6.16.1

- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}


- name: Set node version to 16
uses: actions/setup-node@v2
Expand All @@ -35,6 +27,31 @@ jobs:

- run: pnpm build


- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}

- name: Create Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}

- name: Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sfxcode/vitepress-blog-starter",
"version": "0.8.2",
"version": "0.8.3",
"description": "Vitepress Starter, UnoCSS, Anu, Blog",
"license": "MIT",
"main": "index.js",
Expand Down

0 comments on commit 58312fb

Please sign in to comment.