Skip to content

fix(nvim): preview git hunk with [directory] now works #110

fix(nvim): preview git hunk with [directory] now works

fix(nvim): preview git hunk with [directory] now works #110

Workflow file for this run

# ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
# │ 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/start/mini.nvim/tests
curl -L pixi.sh/install.sh | bash
export PATH="$HOME/.pixi/bin:$PATH"
pixi global install p7zip
curl -L https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/FiraCode.tar.xz | tar -xJf- --directory /tmp && mkdir -p bin/nerd-fonts/patched-fonts/FiraCode && cp /tmp/{FiraCodeNerdFont-Regular.ttf,FiraCodeNerdFont-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
#####################################################################################################################################################################################################################################################################################################################################################################
curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-macos-x86_64.tar.gz | tar -xzf- --directory /tmp && mkdir -p bin/env/bin && cp -r /tmp/nvim-macos-x86_64/* bin/env
curl -L https://github.com/jtroo/kanata/releases/download/v1.10.0-prerelease-2/kanata_macos_cmd_allowed_x86_64 --create-dirs --output bin/env/bin/kanata && chmod +x bin/env/bin/kanata
(
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.25.0 eza=0.21.4 fzf=0.62.0 git=2.49.0 lazygit=0.55.0 less=679 pixi=0.56.0 p7zip=16.02 ripgrep=14.1.1 starship=1.22.1 yazi=25.5.31 # nvim=0.11.2 complains about treesitter for lua filetype
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
curl -L https://github.com/jtroo/kanata/releases/download/v1.10.0-prerelease-2/kanata_cmd_allowed --create-dirs --output bin/env/bin/kanata && chmod +x bin/env/bin/kanata
(
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.25.0 eza=0.21.4 fzf=0.62.0 git=2.49.0 lazygit=0.55.0 less=679 pixi=0.56.0 p7zip=16.02 ripgrep=14.1.1 starship=1.22.1 yazi=25.5.31 zsh=5.9 # nvim=0.11.2 complains about treesitter for lua filetype
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}
#####################################################################################################################################################################################################################################################################################################################################################################
curl -L https://github.com/neovim/neovim/releases/download/nightly/nvim-win64.zip --create-dirs --output /tmp/nvim.zip && mkdir -p bin/windows/envs/windows && unzip /tmp/nvim.zip -d /tmp/nvim && cp -r /tmp/nvim/nvim-win64 bin/windows/envs/windows/Library
curl -L https://github.com/jtroo/kanata/releases/download/v1.10.0-prerelease-2/kanata_cmd_allowed.exe --create-dirs --output bin/windows/envs/windows/Library/bin/kanata.exe
curl -L https://github.com/prefix-dev/pixi/releases/download/v0.56.0/pixi-x86_64-pc-windows-msvc.zip --create-dirs --output /tmp/pixi.zip && unzip /tmp/pixi.zip -d bin/windows/envs/windows/Library/bin
curl -L https://github.com/ip7z/7zip/releases/download/24.09/7zr.exe --create-dirs --output bin/7zr.exe
curl -L https://github.com/git-for-windows/git/releases/download/v2.50.0.windows.1/MinGit-2.50.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
(
export PIXI_HOME="$PWD/bin/windows"
pixi global install --platform win-64 bat=0.25.0 eza=0.21.4 fzf=0.62.0 lazygit=0.55.0 less=679 m2-file=5.46.2 starship=1.22.1 ripgrep=14.1.1 yazi=25.5.31 7zip=24.08 --environment windows
mv bin/windows/envs/windows/bin/{bat.exe,less.exe,lesskey.exe,rg.exe,starship.exe} bin/windows/envs/windows/Library/bin/
)
(
mkdir -p powershell/modules/psreadline
curl -L https://cdn.powershellgallery.com/packages/psreadline.2.4.2-beta2.nupkg --create-dirs --output /tmp/psreadline.zip && mkdir -p powershell/modules/psreadline && unzip /tmp/psreadline.zip -d powershell/modules/psreadline
)
(
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