vim-repeat
vim-repeat copied to clipboard
Publish tagged releases to LuaRocks.org
Summary
This PR is part of a push to get (neo)vim plugins on LuaRocks.
- See this blog post, which follows up on a series of posts by @teto.
- I'm aware this is a vimscript plugin. But that does not prevent
luarocksfrom being able to package this :smile: In fact, as a popular plugin that many other plugins depend on, havingvim-repeaton LuaRocks.org could be great for further adoption. - If you support this, please let me know if you would like me to add equivalent PRs to your other plugins.
Things done:
- Add a workflow that publishes tags to LuaRocks when a tag is pushed.
Notes
- Tagged releases are installed locally and then published to LuaRocks.org. On PRs, a test release is installed, but not published.
- For the release workflow to work, someone with a LuaRocks.org account will have to add their API key to this repo's GitHub actions secrets.
- Due to a shortcoming in LuaRocks (https://github.com/luarocks/luarocks-site/issues/188), the
neovimand/orvimlabels have to be added to the LuaRocks package manually (after the first upload), for this plugin to show up in https://luarocks.org/labels/neovim or https://luarocks.org/labels/vim, respectively.
I have tested this with the quick-scope plugin in Neovim using the following minimal config:
mkdir /tmp/nvim-test
luarocks install --tree /tmp/nvim-test quick-scope
cd /tmp/nvim-test
nvim minimal.lua # paste minimal.lua below
nvim -u minimal.lua test.txt
-- minimal.lua
-- Ignore default config
local config_path = vim.fn.stdpath('config')
vim.opt.rtp:remove(config_path)
-- Ignore default plugins
local data_path = vim.fn.stdpath('data')
local pack_path = data_path .. '/site'
vim.opt.packpath:remove(pack_path)
vim.opt.runtimepath:append('lib/luarocks/rocks-5.1/quick-scope/scm-1/')
...and it works :tada:
Adding the API key (screen shot)
