Skip to content

ci: update changelog #16

ci: update changelog

ci: update changelog #16

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: 'main'
fetch-depth: 0
token: ${{ secrets.CHANGELOG_PUSH_TOKEN }}
- name: Generate changelog
uses: orhun/git-cliff-action@v3
with:
config: cliff.toml
args: --verbose --bump
env:
OUTPUT: CHANGELOG.md
GITHUB_REPO: ${{ github.repository }}
- name: Commit 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 --current --strip header footer
env:
OUTPUT: CHANGES.md
GITHUB_REPO: ${{ github.repository }}
- name: Create release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} \
--title "${{ github.ref_name }}" \
${{ contains(github.ref_name, '-') && '--prerelease' || ''}} \
--notes "${{ steps.git-cliff.outputs.content }}" \
--verify-tag