Skip to content

Commit cecee4b

Browse files
committed
provide 'version' output (closes #52)
1 parent 48cd2d2 commit cecee4b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: setup/action.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ inputs:
99
description: 'If true, install TinyTex, required for PDF rendering'
1010
required: false
1111
default: 'false'
12+
outputs:
13+
version:
14+
description: 'The installed version of quarto.'
1215
runs:
1316
using: 'composite'
1417
steps:
@@ -41,15 +44,22 @@ runs:
4144
if [ -z "${{inputs.version}}" ]; then
4245
# download the latest stable release
4346
gh release download --repo quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}
47+
version=$(curl https://quarto.org/docs/download/_download.json | jq -r '.version')
48+
echo "version=${version}" >> $GITHUB_OUTPUT
4449
elif [ "${{inputs.version}}" == "LATEST" -o "${{inputs.version}}" == "pre-release" ]; then
4550
# get latest pre release version
4651
version=$(curl https://quarto.org/docs/download/_prerelease.json | jq -r '.version')
4752
wget https://github.com/quarto-dev/quarto-cli/releases/download/v$version/quarto-$version-${{env.BUNDLE_EXT}}
53+
echo "version=${version}" >> $GITHUB_OUTPUT
4854
else
4955
# download a specific release
5056
wget https://github.com/quarto-dev/quarto-cli/releases/download/v${{inputs.version}}/quarto-${{inputs.version}}-${{env.BUNDLE_EXT}}
57+
echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT
5158
fi
52-
echo "installer=$(ls quarto*${{ env.BUNDLE_EXT }})" >> $GITHUB_OUTPUT
59+
echo "installer=$(ls quarto*${{ env.BUNDLE_EXT }})" >> $GITHUB_OUTPUT
60+
else
61+
# FIXME: how to get version information from scoop in windows runners?
62+
# send the cderv bat-signal!
5363
fi
5464
shell: bash
5565
- name: 'Install Quarto'

0 commit comments

Comments
 (0)