This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
Merge branch 'release/1.1.25' #29
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: Release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
changelog: | |
name: Generate changelog | |
runs-on: ubuntu-latest | |
outputs: | |
release_body: ${{ steps.release.outputs.RELEASE_BODY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Generate a changelog | |
uses: orhun/git-cliff-action@v2.3.0 | |
id: git-cliff | |
with: | |
config: cliff.toml | |
args: -vv --latest --strip all | |
env: | |
OUTPUT: CHANGES.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'}" # Multiline escape sequences for % | |
r="${r//$'\n'/'%0A'}" # Multiline escape sequences for '\n' | |
r="${r//$'\r'/'%0D'}" # Multiline escape sequences for '\r' | |
echo "::set-output name=RELEASE_BODY::$r" | |
# use release body in another job | |
publish: | |
name: Publish on the GitHub | |
needs: changelog | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create the GitHub release | |
uses: softprops/action-gh-release@v0.1.15 | |
with: | |
body: ${{ needs.changelog.outputs.release_body }} | |
prerelease: ${{ contains(github.ref, '-rc') || contains(github.ref, '-beta') || contains(github.ref, '-alpha') }} |