Skip to content

Commit

Permalink
chore(cd): set the release body on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Jun 20, 2021
1 parent 6a7bdf0 commit 7623977
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
--passphrase-fd 0 --detach-sign \
git-cliff-${{ env.RELEASE_VERSION }}-${{ matrix.TARGET }}.tar.gz
- name: Generate a changelog
if: matrix.OS == 'ubuntu-18.04'
uses: orhun/git-cliff-action@v1
id: git-cliff
with:
Expand All @@ -104,11 +105,15 @@ jobs:
id: release
shell: bash
run: |
r=$(cat ${{ steps.git-cliff.outputs.changelog }})
r="${r//'%'/'%25'}"
r="${r//$'\n'/'%0A'}"
r="${r//$'\r'/'%0D'}"
echo "::set-output name=RELEASE_BODY::$r"
if [ "${{ matrix.OS }}" = "ubuntu-18.04" ]; then
r=$(cat ${{ steps.git-cliff.outputs.changelog }})
r="${r//'%'/'%25'}"
r="${r//$'\n'/'%0A'}"
r="${r//$'\r'/'%0D'}"
echo "::set-output name=RELEASE_BODY::$r"
else
echo "::set-output name=RELEASE_BODY::${{ env.RELEASE_VERSION }}"
fi
- name: Upload the release
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -117,6 +122,7 @@ jobs:
file_glob: true
tag: ${{ github.ref }}
overwrite: true
release_name: "Release v${{ env.RELEASE_VERSION }}"
body: "${{ steps.release.outputs.RELEASE_BODY }}"

publish-docker:
Expand Down

0 comments on commit 7623977

Please sign in to comment.