File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,16 +40,15 @@ jobs:
4040 - name : Read package.json
4141 id : package-json
4242 run : |
43- content=`cat ./package.json`
44- content="${content//'%'/'%25'}"
45- content="${content//$'\n'/'%0A'}"
46- content="${content//$'\r'/'%0D'}"
47- echo "PACKAGE_JSON=$content" >> $GITHUB_ENV
43+ echo "PACKAGE_JSON<<GH-EOF" >> $GITHUB_ENV
44+ cat ./package.json >> $GITHUB_ENV
45+ echo "GH-EOF" >> $GITHUB_OUTPUT
4846
4947 - run : |
5048 version=${{ fromJson(env.PACKAGE_JSON).version }}
49+ escaped_version=$(printf '%s\n' "$version" | sed -e 's/[]\/$*.^[]/\\&/g')
5150 echo "VERSION=$version" >> $GITHUB_ENV
52- echo "ESCAPED_VERISON=$(printf '%s\n' "$version" | sed -e 's/[]\/$*.^[]/\\&/g') " >> $GITHUB_ENV
51+ echo "ESCAPED_VERISON=$escaped_version " >> $GITHUB_ENV
5352 echo "Package Version: **$version** " >> $GITHUB_STEP_SUMMARY
5453
5554 - name : Install
You can’t perform that action at this time.
0 commit comments