Files
vue-flow/.github/workflows/changelog.yml
T
2022-04-04 21:42:48 +02:00

42 lines
964 B
YAML

name: Generate changelog
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
generate-changelog:
name: Generate changelog
runs-on: ubuntu-20.04
outputs:
release_body: ${{ steps.release.outputs.release_body }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Generate a changelog
uses: orhun/git-cliff-action@v1
id: git-cliff
with:
config: cliff.toml
args: --output CHANGELOG.md
env:
OUTPUT: CHANGELOG.md
- name: Set the release body
id: release
shell: bash
run: |
r=$(cat ${{ steps.git-cliff.outputs.changelog }})
r="$(printf "$r" | tail -n +3)"
r="${r//'%'/'%25'}"
r="${r//$'\n'/'%0A'}"
r="${r//$'\r'/'%0D'}"
echo "::set-output name=release_body::$r"