mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-26 23:59:19 +03:00
fix: cleanup markdown modification script in release GHA (#4357)
This commit is contained in:
parent
b91d54623d
commit
d5497592ca
9
.github/workflows/release.yaml
vendored
9
.github/workflows/release.yaml
vendored
@ -23,7 +23,8 @@ jobs:
|
||||
run: cd docs && pnpm install
|
||||
- name: Add content
|
||||
run: |
|
||||
NEW_CONTENT=$(cat <<- END
|
||||
VERSION=$(echo ${{ github.event.release.tag_name }} | sed "s|^.*/||" )
|
||||
NEW_RELEASE_BODY=$(cat <<- END
|
||||
{/* NEW_RELEASE */}
|
||||
|
||||
${{ github.event.release.body }}
|
||||
@ -31,7 +32,11 @@ jobs:
|
||||
END
|
||||
|
||||
)
|
||||
sed -i "s|{/* NEW_RELEASE */}|${NEW_CONTENT}|"
|
||||
|
||||
ESCAPED_DATA="$(echo "${NEW_RELEASE_BODY}" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/\$/\\$/g' | sed 's|<|\\\\<|g')"
|
||||
NEW_CONTENT="$(echo "${ESCAPED_DATA}" | sed "s|## What's Changed|## ${VERSION}|")"
|
||||
|
||||
sed -i "s|{/\* NEW_RELEASE \*/}|${NEW_CONTENT}|"
|
||||
- name: Push changes
|
||||
run: |
|
||||
cd docs
|
||||
|
Loading…
Reference in New Issue
Block a user