apply some of clippy's suggestions #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Changelog | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
jobs: | |
unreleased-changes: | |
name: Unreleased Changes | |
runs-on: ubuntu-22.04 | |
outputs: | |
release_body: ${{ steps.git-cliff.outputs.content }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- uses: orhun/git-cliff-action@main | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: -vv --unreleased --strip header | |
- name: Output Step Summary | |
run: | | |
echo "${{ steps.git-cliff.outputs.content }}" >> $GITHUB_STEP_SUMMARY | |
update-changelog: | |
name: Update Changelog | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- uses: orhun/git-cliff-action@main | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: -vv | |
env: | |
OUTPUT: "CHANGELOG.md" | |
- name: Push Changes | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "chore: update changelog" | |
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | |
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json |