File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818 VERSION="${{ inputs.version }}"
1919 if [ "$VERSION" = 'latest' ]; then
20- VERSION=$(curl -sSfL \
21- -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
22- "https://api.github.com/repos/WebAssembly/binaryen/releases/latest" \
23- | jq -r '.tag_name')
20+ VERSION=$(gh release view \
21+ --repo WebAssembly/binaryen \
22+ --json tagName -q .tagName)
2423 fi
2524 echo "Version: $VERSION"
2625
@@ -50,16 +49,16 @@ runs:
5049 fi
5150 echo "Test: $ASSET"
5251
53- ASSET=$(curl -sSfL \
54- -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
55- "https://api.github.com/repos/WebAssembly/binaryen/releases/tags/$VERSION" \
56- | jq -r ".assets[].name | select(test(\"$ASSET\"))")
52+ ASSET=$(gh release view $VERSION \
53+ --repo WebAssembly/binaryen \
54+ --json assets -q ".assets[].name | select(test(\"$ASSET\"))")
5755 echo "Asset: $ASSET"
5856
5957 mkdir binaryen
60- curl -sSfL \
61- -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
62- "https://github.com/WebAssembly/binaryen/releases/download/$VERSION/$ASSET" \
58+ gh release download $VERSION \
59+ --repo WebAssembly/binaryen \
60+ --pattern $ASSET \
61+ -O - \
6362 | tar -xzC binaryen --strip-components=1
6463 ls binaryen/bin
6564 echo "$(pwd -W 2>/dev/null || pwd)/binaryen/bin" >> $GITHUB_PATH
You can’t perform that action at this time.
0 commit comments