Skip to content

ci: update changelog #1

ci: update changelog

ci: update changelog #1

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
release-notes:
name: Generate release notes
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CHANGELOG_PUSH_TOKEN }}
- name: Generate changelog using git-cliff
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: --verbose --bump
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit the changelog
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add CHANGELOG.md
git commit -m "ci: update changelog"
git push
- name: Generate release notes
uses: orhun/git-cliff-action@v3
id: git-cliff
with:
config: cliff.toml
args: --verbose --github-repo ${{ github.repository }} --current --strip header footer
- name: Create GitHub release
if: ${{ !contains(github.ref, '-' )}}
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.git-cliff.outputs.content }}
draft: true
prerelease: false
- name: Create GitHub pre-release
if: ${{ contains(github.ref, '-' )}}
id: create-prerelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ steps.git-cliff.outputs.content }}
draft: true
prerelease: true