auto-generate changelog on release

This commit is contained in:
Guillem Castro 2024-05-17 18:23:41 +02:00
parent fd95b5a0a9
commit 5806b26baf

View file

@ -13,10 +13,41 @@ permissions:
jobs: jobs:
release:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- name: Create Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: false
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref_name }}
- name: Commit CHANGELOG.md
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: master
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]'
file_pattern: CHANGELOG.md
linux: linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
needs: release
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: install Rust stable - name: install Rust stable
@ -42,6 +73,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
strategy: strategy:
fail-fast: false fail-fast: false
needs: release
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: install Rust stable - name: install Rust stable
@ -67,6 +99,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
strategy: strategy:
fail-fast: false fail-fast: false
needs: release
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: install Rust stable - name: install Rust stable