Skip to content

Commit

Permalink
fix: use $GITHUB_OUTPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
sockmaster27 committed Mar 17, 2024
1 parent 7c7aa4c commit 386afaf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
id: package
# Reads the contents of `pacakge.json` into `steps.package.outputs.content`
run: |
content=`cat ./package.json`
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
echo "::set-output name=content::$content"
{
echo 'content<<EOF'
cat ./package.json
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Extract minimum version
id: minver
# Reads the contents of the `engines.vscode` field into `steps.minver.outputs.version` with the leading ^ removed.
run: |
version=${{ fromJson(steps.package.outputs.content).engines.vscode }}
version=${version#^}
echo "::set-output name=version::$version"
echo "version=$version" >> "$GITHUB_OUTPUT"
check:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 386afaf

Please sign in to comment.