File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change 11name : ' Install Quarto'
22author : ' Christophe Dervieux'
33description : ' This actions will install Quarto binary from https://github.com/quarto-dev/quarto-cli/'
4+ inputs :
5+ version :
6+ description : ' The version of Quarto CLI to install, as a release tag (https://github.com/quarto-dev/quarto-cli/releases). Ex: 0.3.73'
7+ required : false
48runs :
59 using : ' composite'
610 steps :
2226 exit 1
2327 ;;
2428 esac
29+ # set version
30+ if [ ! -z "${{inputs.version}}" ]
31+ then
32+ echo "QUARTO_VERSION=v${{inputs.version}}" >> $GITHUB_ENV
33+ fi
2534 shell : bash
2635 - name : ' Download Quarto release'
2736 id : download-quarto
3140 # download the latest release
3241 if [ ${{ runner.os }} != "Windows" ]; then
3342 # On Windows scoop will be used so no need to download the release
34- gh release download --repo quarto-dev/quarto-cli --pattern ${{ format('*.{0}', env.BUNDLE_EXT) }}
43+ gh release download ${{env.QUARTO_VERSION}} --repo quarto-dev/quarto-cli --pattern ${{ format('*.{0}', env.BUNDLE_EXT) }}
3544 echo "::set-output name=installer::$(ls quarto*.$BUNDLE_EXT)"
3645 fi
3746 shell : bash
4857 ;;
4958 "Windows")
5059 # can't install msi for now so use scoop
51- powershell -File $GITHUB_ACTION_PATH/install-quarto-windows.ps1
60+ if [ -z "${{ env.QUARTO_VERSION }}" ]
61+ then
62+ powershell -File $GITHUB_ACTION_PATH/install-quarto-windows.ps1
63+ else
64+ powershell -File $GITHUB_ACTION_PATH/install-quarto-windows.ps1 -version ${{ env.QUARTO_VERSION }}
65+ fi
5266 ;;
5367 *)
5468 echo "$RUNNER_OS not supported"
Original file line number Diff line number Diff line change 1414 ttps:/go.microsoft.com/fwlink/?LinkID=135170
1515#>
1616
17- Invoke-Expression (New-Object System.Net.WebClient).DownloadString(' https://get.scoop.sh' )
18- Join-Path (Resolve-Path ~).Path " scoop\shims" >> $Env: GITHUB_PATH
17+ # Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
18+ # Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
19+
20+ param ($version )
1921scoop bucket add r- bucket https:// github.com / cderv/ r- bucket.git
20- scoop install quarto
22+ if ([string ]::IsNullOrEmpty($version )) {
23+ scoop install quarto
24+ }else {
25+ Invoke-Expression - Command " scoop install quarto@$version "
26+ }
You can’t perform that action at this time.
0 commit comments