Skip to content

Commit 2727846

Browse files
committed
download from URL directly when specific version if set
1 parent 32c15b1 commit 2727846

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

install-quarto/action.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,36 +13,36 @@ runs:
1313
# Select correct bundle for OS type
1414
case $RUNNER_OS in
1515
"Linux")
16-
echo "BUNDLE_EXT=deb" >> $GITHUB_ENV
16+
echo "BUNDLE_EXT=linux-amd64.deb" >> $GITHUB_ENV
1717
;;
1818
"macOS")
19-
echo "BUNDLE_EXT=pkg" >> $GITHUB_ENV
19+
echo "BUNDLE_EXT=macos.pkg" >> $GITHUB_ENV
2020
;;
2121
"Windows")
22-
echo "BUNDLE_EXT=msi" >> $GITHUB_ENV
22+
echo "BUNDLE_EXT=win.msi" >> $GITHUB_ENV
2323
;;
2424
*)
2525
echo "$RUNNER_OS not supported"
2626
exit 1
2727
;;
2828
esac
29-
# set version
30-
if [ ! -z "${{inputs.version}}" ]
31-
then
32-
echo "QUARTO_VERSION=v${{inputs.version}}" >> $GITHUB_ENV
33-
fi
3429
shell: bash
3530
- name: 'Download Quarto release'
3631
id: download-quarto
3732
env:
3833
GITHUB_TOKEN: ${{ github.token }}
3934
run: |
40-
# download the latest release
4135
if [ ${{ runner.os }} != "Windows" ]; then
42-
# On Windows scoop will be used so no need to download the release
43-
gh release download ${{env.QUARTO_VERSION}} --repo quarto-dev/quarto-cli --pattern ${{ format('*.{0}', env.BUNDLE_EXT) }}
44-
echo "::set-output name=installer::$(ls quarto*.$BUNDLE_EXT)"
36+
# On Windows scoop will be used so no need to download the release
37+
if [ -z "${{inputs.version}}" ]; then
38+
# download the latest release
39+
gh release download --repo quarto-dev/quarto-cli --pattern ${{ format('*.{0}', env.BUNDLE_EXT) }}
40+
else
41+
# download a specific release
42+
wget https://github.com/quarto-dev/quarto-cli/releases/download/v${{inputs.version}}/quarto-${{inputs.version}}-${{env.BUNDLE_EXT}}
43+
fi
4544
fi
45+
echo "::set-output name=installer::$(ls quarto*${{ env.BUNDLE_EXT }})"
4646
shell: bash
4747
- name: 'Install Quarto'
4848
run: |

0 commit comments

Comments
 (0)