Skip to content

Commit

Permalink
workflow: upload changelog actions
Browse files Browse the repository at this point in the history
  • Loading branch information
HsiangNianian committed Aug 15, 2024
1 parent 2c1d8b2 commit f5ef7fa
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CHANGELOG

on:
push:
# tags:
# - "v*"
# - v[0-9]+.[0-9]+.[0-9]+
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
includeInvalidCommits: true
changelogFilePath: CHANGELOG.md
writeToFile: true
useGitmojis: false

- 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@v5
with:
branch: main
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md
1 change: 1 addition & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include::../../CHANGELOG.md
9 changes: 8 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ This is a template for documentation projects.
:hidden:
:caption: Contents

contents/index
contents/index

.. toctree::
:hidden:
:caption: Helpings

changelog

0 comments on commit f5ef7fa

Please sign in to comment.