fix(nvim): treesitter support from helix #138
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ | |
| # │ systemctl start docker && act -s VSCE_TOKEN -s GITHUB_TOKEN="$(gh auth token)" -j upload-release --artifact-server-path ./artifacts --action-offline-mode --action-cache-path "$HOME/.cache/act" │ | |
| # ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ | |
| # https://github.com/nektos/act/issues/2433 | |
| name: Upload_Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # https://josh-ops.com/posts/gh-auth-login-in-actions/ | |
| # https://stackoverflow.com/questions/76830110/github-cli-from-github-actions-workflow | |
| # https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#secrets-context | |
| # Since `VSCE_TOKEN` is a secret variable, it is not immediately usable as an environment variable. see: https://github.com/microsoft/vscode-docs/pull/3857 | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # setting GH_TOKEN for the entire workflow | |
| VSCE_PAT: ${{ secrets.VSCE_TOKEN }} | |
| OVSX_PAT: ${{ secrets.OVSX_TOKEN }} | |
| # https://github.com/googleapis/release-please-action?tab=readme-ov-file#workflow-permissions | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| upload-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # https://www.youtube.com/watch?v=P0wAXh5UOnM | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| release-type: node | |
| - name: Checkout 🛬 | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: actions/checkout@v4 | |
| - name: Publish to vscode marketplace 🚀 | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: | | |
| ################################################################################################################################################################################################################################################################################################## | |
| git submodule update --init; | |
| rm -rf ./nvim/plugins/site/pack/deps/opt/snacks.nvim/tests | |
| rm -rf ./nvim/plugins/site/pack/deps/opt/mini.nvim/tests | |
| curl -L pixi.sh/install.sh | bash | |
| export PATH="$HOME/.pixi/bin:$PATH" | |
| pixi global install p7zip | |
| # pixi global install libarchive # curl -L ... | bsdtar -x --directory=/tmp | |
| mkdir -p bin/nerd-fonts/patched-fonts/FiraCode | |
| curl -L https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/FiraCode.tar.xz --create-dirs --output /tmp/firacode.tar.xz && tar -xJf /tmp/firacode.tar.xz --directory /tmp && cp /tmp/FiraCodeNerdFont-{Regular,Medium,Bold}.ttf bin/nerd-fonts/patched-fonts/FiraCode | |
| curl -L https://raw.githubusercontent.com/ryanoasis/nerd-fonts/refs/heads/master/install.ps1 --create-dirs --output bin/nerd-fonts/install.ps1 | |
| ################################################################################################################################################################################################################################################################################################## | |
| mkdir -p bin/env | |
| curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz --create-dirs --output /tmp/nvim.tar.gz && tar -xzf /tmp/nvim.tar.gz --directory /tmp && cp -r /tmp/nvim-macos-x86_64/* bin/env | |
| ( | |
| mkdir -p bin/pixi_pack | |
| cd bin/pixi_pack | |
| pixi init | |
| pixi global install pixi-pack=0.7.1 | |
| pixi add --platform osx-64 bat=0.26.1 eza=0.21.4 fzf=0.67.0 git=2.52.0 lazygit=0.57.0 less=679 pixi=0.65.0 p7zip=16.02 ripgrep=14.1.1 starship=1.22.1 yazi=26.1.22 # nvim=0.11.2 complains about treesitter for lua filetype | |
| pixi add --platform osx-64 kanata --channel https://prefix.dev/retronvim | |
| pixi-pack --platform osx-64 --create-executable | |
| cp environment.sh .. | |
| cd .. | |
| rm -r pixi_pack | |
| ) | |
| yes | npx vsce package | |
| npx vsce publish | |
| # npx ovsx create-namespace YeferYV | |
| yes | npx ovsx publish | |
| rm -rf bin/{environment.sh,env} | |
| ################################################################################################################################################################################################################################################################################################## | |
| curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.appimage --create-dirs --output bin/env/bin/nvim && chmod +x bin/env/bin/nvim | |
| ( | |
| mkdir -p bin/pixi_pack | |
| cd bin/pixi_pack | |
| pixi init | |
| pixi global install pixi-pack=0.7.1 | |
| pixi add --platform linux-64 bat=0.26.1 eza=0.21.4 fzf=0.67.0 git=2.52.0 lazygit=0.57.0 less=679 pixi=0.65.0 p7zip=16.02 ripgrep=14.1.1 starship=1.22.1 yazi=26.1.22 zsh=5.9 # nvim=0.11.2 complains about treesitter for lua filetype | |
| pixi add --platform linux-64 kanata --channel https://prefix.dev/retronvim | |
| pixi-pack --platform linux-64 --create-executable | |
| cp environment.sh .. | |
| cd .. | |
| rm -r pixi_pack | |
| ) | |
| yes | npx vsce package --target linux-x64 | |
| npx vsce publish --target linux-x64 | |
| yes | npx ovsx publish --target linux-x64 | |
| rm -rf bin/{environment.sh,env} | |
| ################################################################################################################################################################################################################################################################################################## | |
| mkdir -p bin/windows/envs/windows/Library | |
| mkdir -p powershell/modules/psreadline | |
| curl -L https://github.com/ip7z/7zip/releases/download/24.09/7zr.exe --create-dirs --output bin/7zr.exe | |
| curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip --create-dirs --output /tmp/nvim.zip && unzip /tmp/nvim.zip -d /tmp/nvim && cp -r /tmp/nvim/nvim-win64/* bin/windows/envs/windows/Library | |
| curl -L https://github.com/prefix-dev/pixi/releases/download/v0.65.0/pixi-x86_64-pc-windows-msvc.zip --create-dirs --output /tmp/pixi.zip && unzip /tmp/pixi.zip -d /tmp/pixi && cp -r /tmp/pixi/pixi.exe bin/windows/envs/windows/Library/bin/pixi.exe | |
| curl -L https://github.com/git-for-windows/git/releases/download/v2.52.0.windows.1/MinGit-2.52.0-busybox-64-bit.zip --create-dirs --output /tmp/git.zip && unzip /tmp/git.zip -d /tmp/git && cp -r /tmp/git/* bin/windows/envs/windows/Library | |
| curl -L https://cdn.powershellgallery.com/packages/psreadline.2.4.2-beta2.nupkg --create-dirs --output /tmp/psreadline.zip && unzip /tmp/psreadline.zip -d /tmp/psreadline && cp -r /tmp/psreadline/* powershell/modules/psreadline | |
| ( | |
| export PIXI_HOME="$PWD/bin/windows" | |
| pixi global install --platform win-64 bat=0.26.1 eza=0.21.4 fzf=0.67.0 lazygit=0.57.0 less=679 m2-file=5.46.2 starship=1.22.1 ripgrep=14.1.1 yazi=26.1.22 7zip=24.08 --environment windows | |
| pixi global install --platform win-64 kanata --channel https://prefix.dev/retronvim | |
| mv bin/windows/envs/windows/bin/{bat.exe,less.exe,lesskey.exe,rg.exe,starship.exe} bin/windows/envs/windows/Library/bin/ | |
| rm -f bin/windows/envs/windows/Library/bin/nvim.pdb # shipped in nightly builds | |
| cd bin | |
| 7z a -mx9 windows.7z windows | |
| ) | |
| rm -r bin/windows | |
| yes | npx vsce package --target win32-x64 | |
| npx vsce publish --target win32-x64 | |
| yes | npx ovsx publish --target win32-x64 | |
| ################################################################################################################################################################################################################################################################################################## | |
| - name: Github release 📦 | |
| if: ${{ steps.release.outputs.release_created }} | |
| run: gh release upload ${{ steps.release.outputs.tag_name }} *.vsix | |
| - name: Upload files to `./artifacts` 📤 | |
| if: ${{ steps.release.outputs.release_created }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: my-release | |
| path: ./retronvim-*.vsix |