Skip to content

Commit dd84626

Browse files
authored
Merge pull request #141 from NIFU-NO/dev
bump
2 parents 5e3dc16 + 2f43f1b commit dd84626

File tree

2 files changed

+122
-1
lines changed

2 files changed

+122
-1
lines changed

.github/workflows/quarto-setup.yaml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: 'Setup Quarto'
2+
author: 'Christophe Dervieux'
3+
description: 'This action will setup Quarto from the git repository https://github.com/quarto-dev/quarto-cli/'
4+
inputs:
5+
version:
6+
description: 'The version of Quarto to use. Either a release tag without "v" prefix (e.g., "0.9.486"), "pre-release" for latest built dev version, or "release", for the latest stable version.'
7+
required: false
8+
default: 'release'
9+
tinytex:
10+
description: 'If true, install TinyTex, required for PDF rendering'
11+
required: false
12+
default: 'false'
13+
outputs:
14+
version:
15+
description: 'The installed version of quarto.'
16+
runs:
17+
using: 'composite'
18+
steps:
19+
- name: 'Choose which binary to use'
20+
run: |
21+
# Select correct bundle for OS type
22+
case $RUNNER_OS in
23+
"Linux")
24+
echo "BUNDLE_EXT=linux-amd64.deb" >> $GITHUB_ENV
25+
;;
26+
"macOS")
27+
echo "BUNDLE_EXT=macos.pkg" >> $GITHUB_ENV
28+
;;
29+
"Windows")
30+
echo "BUNDLE_EXT=win.msi" >> $GITHUB_ENV
31+
;;
32+
*)
33+
echo "$RUNNER_OS not supported"
34+
exit 1
35+
;;
36+
esac
37+
shell: bash
38+
working-directory: ${{ runner.temp }}
39+
- name: 'Download Quarto'
40+
id: download-quarto
41+
env:
42+
GITHUB_TOKEN: ${{ github.token }}
43+
run: |
44+
if [ ${{ runner.os }} != "Windows" ]; then
45+
# On Windows scoop will be used so no need to download the release
46+
if [ "${{inputs.version}}" == "release" ]; then
47+
# download the latest stable release
48+
gh release download --repo github.com/quarto-dev/quarto-cli --pattern ${{ format('*{0}', env.BUNDLE_EXT) }}
49+
version=$(curl https://quarto.org/docs/download/_download.json | jq -r '.version')
50+
echo "version=${version}" >> $GITHUB_OUTPUT
51+
elif [ "${{inputs.version}}" == "LATEST" -o "${{inputs.version}}" == "pre-release" ]; then
52+
# get latest pre release version
53+
version=$(curl https://quarto.org/docs/download/_prerelease.json | jq -r '.version')
54+
wget https://github.com/quarto-dev/quarto-cli/releases/download/v$version/quarto-$version-${{env.BUNDLE_EXT}}
55+
echo "version=${version}" >> $GITHUB_OUTPUT
56+
else
57+
# download a specific release
58+
wget https://github.com/quarto-dev/quarto-cli/releases/download/v${{inputs.version}}/quarto-${{inputs.version}}-${{env.BUNDLE_EXT}}
59+
echo "version=${{inputs.version}}" >> $GITHUB_OUTPUT
60+
fi
61+
echo "installer=$(ls quarto*${{ env.BUNDLE_EXT }})" >> $GITHUB_OUTPUT
62+
else
63+
: # do nothing for now (https://github.com/quarto-dev/quarto-actions/issues/59 :facepalm:)
64+
# FIXME: how to get version information from scoop in windows runners?
65+
# send the cderv bat-signal!
66+
fi
67+
shell: bash
68+
working-directory: ${{ runner.temp }}
69+
- name: 'Install Quarto'
70+
run: |
71+
# Install quarto
72+
[ ${{ runner.os }} != "Windows" ] && installer=${{ steps.download-quarto.outputs.installer }}
73+
case $RUNNER_OS in
74+
"Linux")
75+
sudo apt install ./$installer
76+
;;
77+
"macOS")
78+
sudo installer -pkg ./$installer -target '/'
79+
;;
80+
"Windows")
81+
# can't install msi for now so use scoop
82+
if [ "${{inputs.version}}" == "release" ]
83+
then
84+
powershell -File $GITHUB_ACTION_PATH/install-quarto-windows.ps1
85+
else
86+
powershell -File $GITHUB_ACTION_PATH/install-quarto-windows.ps1 ${{ inputs.version }}
87+
fi
88+
;;
89+
*)
90+
echo "$RUNNER_OS not supported"
91+
exit 1
92+
;;
93+
esac
94+
[ ${{ runner.os }} != "Windows" ] && rm $installer
95+
echo "Quarto Installed !"
96+
shell: bash
97+
working-directory: ${{ runner.temp }}
98+
- name: 'Install TinyTeX'
99+
env:
100+
QUARTO_PRINT_STACK: true
101+
if: ${{ inputs.tinytex == 'true'}}
102+
run: |
103+
quarto install tool tinytex --no-prompt --log-level warning
104+
case $RUNNER_OS in
105+
"Linux")
106+
echo "$HOME/bin" >> $GITHUB_PATH
107+
;;
108+
"macOS")
109+
echo "$(dirname $(find ~/Library/TinyTeX -name tlmgr))" >> $GITHUB_PATH
110+
;;
111+
"Windows")
112+
echo "$(dirname $(find $APPDATA/TinyTeX -name tlmgr.bat))" >> $GITHUB_PATH
113+
;;
114+
*)
115+
echo "$RUNNER_OS not supported"
116+
exit 1
117+
;;
118+
esac
119+
echo "TinyTeX installed !"
120+
shell: bash
121+
working-directory: ${{ runner.temp }}

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: saros.base
33
Title: Base Tools for Semi-Automatic Reporting of Ordinary Surveys
4-
Version: 0.5.1
4+
Version: 1.0.0
55
Authors@R: c(
66
person(given = "Stephan",
77
family = "Daus",

0 commit comments

Comments
 (0)