Skip to content

Release

Release #42

Workflow file for this run

name: Changelog
on:
push:
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
changelog:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v4
id: git-cliff
with:
config: cliff.toml
args: -vv --latest --strip header
env:
OUTPUT: docs/CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit
run: |
git checkout main
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add docs/CHANGELOG.md
git commit -m "docs(changelog): update"
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git main
upload:
name: Upload the release
runs-on: ubuntu-latest
needs: changelog
if: ${{ github.event_name == 'tag' }}
steps:
- name: Upload the binary releases
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: ${{ needs.changelog.outputs.release_body }}