diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d8cf2e66..bd88ddc3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,6 @@ jobs: matrix: include: - os: ubuntu-20.04 - url: https://github.com/neovim/neovim/releases/download/v0.10.0/nvim-linux64.tar.gz manager: sudo apt-get packages: -y fd-find steps: @@ -21,14 +20,18 @@ jobs: uses: actions/cache@v4 with: path: _neovim - key: ${{ runner.os }}-${{ matrix.url }}-${{ hashFiles('todays-date') }} + key: ${{ runner.os }}-latest-${{ hashFiles('todays-date') }} - name: Prepare + env: + GH_TOKEN: ${{ github.token }} run: | ${{ matrix.manager }} update ${{ matrix.manager }} install ${{ matrix.packages }} + latest_version=$(gh release list --limit 1 --repo neovim/neovim --exclude-drafts --exclude-pre-releases --json tagName --jq '.[0].tagName') + url="https://github.com/neovim/neovim/releases/download/$latest_version/nvim-linux-x86_64.tar.gz" test -d _neovim || { mkdir -p _neovim - curl -sL ${{ matrix.url }} | tar xzf - --strip-components=1 -C "${PWD}/_neovim" + curl -sL $url | tar xzf - --strip-components=1 -C "${PWD}/_neovim" } mkdir -p ~/.local/share/nvim/site/pack/vendor/start git clone --depth 1 https://github.com/nvim-lua/plenary.nvim ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim