mirror of
https://github.com/orhun/git-cliff-action.git
synced 2026-03-22 15:35:44 +08:00
docs(readme): simplify the advanced example
This commit is contained in:
16
README.md
16
README.md
@@ -60,7 +60,7 @@ jobs:
|
|||||||
name: Generate changelog
|
name: Generate changelog
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
release_body: ${{ steps.release.outputs.RELEASE_BODY }}
|
release_body: ${{ steps.git-cliff.outputs.content }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@@ -76,18 +76,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
OUTPUT: CHANGES.md
|
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
|
# use release body in the same job
|
||||||
- name: Upload the binary releases
|
- name: Upload the binary releases
|
||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
@@ -95,7 +83,7 @@ jobs:
|
|||||||
file: binary_release.zip
|
file: binary_release.zip
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tag: ${{ github.ref }}
|
tag: ${{ github.ref }}
|
||||||
body: ${{ steps.release.outputs.RELEASE_BODY }}
|
body: ${{ steps.git-cliff.outputs.content }}
|
||||||
|
|
||||||
# use release body in another job
|
# use release body in another job
|
||||||
upload:
|
upload:
|
||||||
|
|||||||
Reference in New Issue
Block a user