nvim-lua / nvim-lua-plugin-template

A starter template for a Neovim plugin written in Lua
140 stars 13 forks source link

luarocks-tag-release workflow? #10

Closed mrcjkb closed 5 months ago

mrcjkb commented 1 year ago

@teto and I are trying to promote the use of LuaRocks to distribute Neovim plugins.

Would you be open to a PR that adds the luarocks-tag-release GitHub action to this template?

By now, it has matured enough that most Neovim plugins only need to add the action, without any inputs.

Its use could be seen as controversial, because:

matu3ba commented 1 year ago

Can you provide a brief overview and comparison to https://github.com/nvim-lua/nvim-package-specification ? I'm still missing something like luarocks update --all, but I see the point of having a separate package index.

mrcjkb commented 1 year ago

@matu3ba Sure :smile:

The workflow doesn't define any specification. I uses the existing rockspec format, which has been well-established in the Lua ecosystem (it's the de facto standard).

It's difficult to build an opinion on the Neovim package spec, because it's still WIP. So I can only give you my (opinionated) thoughts based on what I know about the current status.

mfussenegger commented 1 year ago

It requires a LuaRocks account

Do you have an idea how to handle that? It should at least not cause failures if the credentials are missing. I think assuming tagged releases is fine (and actually good that it doesn't do anything if there are no tags).

mrcjkb commented 1 year ago

The action will (and should) fail if the API key is missing. But one could add

if: env.LUAROCKS_API_KEY != null

to the step that runs the action. This would skip it if the API key isn't set.

and actually good that it doesn't do anything if there are no tags

We do have plans to add support for luarocks test and also testing luarocks install (and maybe upload) in PRs - which we will recommend. Otherwise the only way to test that the workflow doesn't break would be to merge and tag.

These could also be skipped if the API key isn't set.