Skip to content

Commit

Permalink
docs(readme): simplify the advanced example
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Jan 7, 2023
1 parent ba98705 commit cdaecb9
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
name: Generate changelog
runs-on: ubuntu-latest
outputs:
release_body: ${{ steps.release.outputs.RELEASE_BODY }}
release_body: ${{ steps.git-cliff.outputs.content }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -76,26 +76,14 @@ jobs:
env:
OUTPUT: CHANGES.md

- name: Set the release body
id: release
shell: bash
run: |
r=$(cat ${{ steps.git-cliff.outputs.changelog }})
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 'RELEASE_BODY<<EOF' >> $GITHUB_ENV
echo "$r" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
# use release body in the same job
- name: Upload the binary releases
uses: svenstaro/upload-release-action@v2
with:
file: binary_release.zip
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
body: ${{ steps.release.outputs.RELEASE_BODY }}
body: ${{ steps.git-cliff.outputs.content }}

# use release body in another job
upload:
Expand Down

0 comments on commit cdaecb9

Please sign in to comment.