ITADN

ci: automatic releases + publish to luarocks

#4Pull Requestmrcjkb 创建于 2024-08-20
M
mrcjkbcommented
Hey :wave: It would be great to have this on luarocks.org, so that people can use it with rocks.nvim See also: - [rocks.nvim](https://github.com/nvim-neorocks/rocks.nvim), a new luarocks-based plugin manager. - [this blog post](https://mrcjkb.github.io/posts/2023-01-10-luarocks-tag-release.html). With luarocks/rocks.nvim, it is [the plugin authors' responsibility to declare dependencies - not the user's](https://github.com/nvim-neorocks/rocks.nvim?tab=readme-ov-file#grey_question-why-rocksnvim). Installing this plugin becomes as simple as `:Rocks install lzn-auto-require`. If a neovim plugin in nixpkgs has a luarocks package as a source, it will also automatically resolve dependencies. ### Things done: - Add a workflow that publishes tags to luarocks.org when a tag or release is pushed. - Add a release-please workflow that creates release PRs with SemVer versioning based on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/). The workflows are based on [this guide](https://github.com/nvim-neorocks/sample-luarocks-plugin) ### Notes: > [!IMPORTANT] > > - **For the luarocks workflow to work, someone with a luarocks.org account will have to add their [API key](https://luarocks.org/settings/api-keys) to this repo's [GitHub actions secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository)**. - On each merge to `master`, the `release-please` workflow creates (or updates an existing) release PR, and a changelog (based on conventional commits). - You decide when to merge release PRs. Doing so will result in a SemVer tag, a changelog update, and a GitHub release, which will trigger the `luarocks` workflow. - Tagged releases are installed locally and then published to luarocks.org. - If you push tags from a local checkout, the workflow is triggered automatically. - If you use GitHub releases to create tags, you may need to [add a PA token](https://github.com/nvim-neorocks/sample-luarocks-plugin?tab=readme-ov-file#generating-a-pat-personal-access-token) for the workflow to be triggered automatically. - Due to a shortcoming in luarocks.org (https://github.com/luarocks/luarocks-site/issues/188), the `neovim` and/or `vim` labels 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.
合并状态:未合并 关闭于 2024-08-21 5 条评论