Skip to content

Commit

Permalink
Update deploy workflow Just when i thought there's no door to escape …
Browse files Browse the repository at this point in the history
…my downs
  • Loading branch information
StefanH-AT committed Dec 29, 2022
1 parent 459cb45 commit aa859e4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@ jobs:
- name: Read package.json
id: package-json
run: |
content=`cat ./package.json`
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "PACKAGE_JSON=$content" >> $GITHUB_ENV
echo "PACKAGE_JSON<<GH-EOF" >> $GITHUB_ENV
cat ./package.json >> $GITHUB_ENV
echo "GH-EOF" >> $GITHUB_OUTPUT
- run: |
version=${{ fromJson(env.PACKAGE_JSON).version }}
escaped_version=$(printf '%s\n' "$version" | sed -e 's/[]\/$*.^[]/\\&/g')
echo "VERSION=$version" >> $GITHUB_ENV
echo "ESCAPED_VERISON=$(printf '%s\n' "$version" | sed -e 's/[]\/$*.^[]/\\&/g')" >> $GITHUB_ENV
echo "ESCAPED_VERISON=$escaped_version" >> $GITHUB_ENV
echo "Package Version: **$version** " >> $GITHUB_STEP_SUMMARY
- name: Install
Expand Down

0 comments on commit aa859e4

Please sign in to comment.