@@ -13,14 +13,15 @@ env:
1313 matrix:
1414 - PATH=$HOME/purescript:$PATH
1515
16−install:
17−- export PURS_VERSION=v0.13.3
18−- wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$PURS_VERSION/linux64.tar.gz
19−- tar -xvf $HOME/purescript.tar.gz -C $HOME/
20−- chmod a+x $HOME/purescript
21−- npm install -g spago
22−- npm install
23−- spago install
16+install: |
17+ PURS_VERSION="$(curl -H "Authorization: token $GITHUB_API_TOKEN" --silent "https://api.github.com/repos/purescript/purescript/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')"
18+ echo "PureScript version: $PURS_VERSION"
19+ wget -O $HOME/purescript.tar.gz https://github.com/purescript/purescript/releases/download/$PURS_VERSION/linux64.tar.gz
20+ tar -xvf $HOME/purescript.tar.gz -C $HOME/
21+ chmod a+x $HOME/purescript
22+ npm install -g spago
23+ npm install
24+ spago install
2425
2526script:
2627- npm run build