Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: luarocks/rocks.nvim support #19

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented May 23, 2024

Hey 👋

Summary

This PR is part of a push to get neovim plugins on luarocks.org.

See also:

With luarocks/rocks.nvim, it is the plugin authors' responsibility to declare dependencies - not the user's.
Installing this plugin becomes as simple as :Rocks install telescope-zf-native.nvim.

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.

The workflows are based on this guide

Notes:

Important

  • On each merge to master (if this lands on master), the release-please workflow creates (or updates an existing) release PR.
  • 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.
    If you would like versioning to start from a specific version (e.g. 2.0.0), you can configure this with a manifest.
  • 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 for the workflow to be triggered automatically.
  • Due to a shortcoming in luarocks.org (label doesn't get picked up from rockspec luarocks/luarocks-site#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.

@natecraddock natecraddock linked an issue May 27, 2024 that may be closed by this pull request
@natecraddock
Copy link
Owner

Sorry for the delay on this, I've been swamped the last month. I'll take a closer look later today / over the next few days and get back to you

@natecraddock
Copy link
Owner

Hey @NTBBloodbath, since you are part of neorocks, I'll let you handle this one :) Looks like you approved it. Feel free to merge whenever you feel it is ready

@NTBBloodbath
Copy link
Collaborator

Hey @NTBBloodbath, since you are part of neorocks, I'll let you handle this one :) Looks like you approved it. Feel free to merge whenever you feel it is ready

Hey, sorry it took so long. It seems like I would need to add both my GitHub token for CI actions and my luarocks API key as well in the repository but as a contributor I don't seem to be able to.

Not sure if you could create them in your GitHub account, otherwise feel free to slap me with an email and I'll reply back with the required keys to get this to work properly

@natecraddock
Copy link
Owner

natecraddock commented Jun 23, 2024

@NTBBloodbath so there is more work to do than just merge this? Like I wouldn't be able to merge it myself and everything just work?

If I understand right, I would need to add an environment to this repository with your luarocks API key? Feel free to email me any information I need to set this up. Either my git email or the one on my website are fine

@NTBBloodbath
Copy link
Collaborator

@NTBBloodbath so there is more work to do than just merge this? Like I wouldn't be able to merge it myself and everything just work?

If I understand right, I would need to add an environment to this repository with your luarocks API key? Feel free to email me any information I need to set this up. Either my git email or the one on my website are fine

Yes sir, there are two secrets that must be added to the repository!

  1. the luarocks CI needs a luarocks API key in order to be able to publish the plugin to the luarocks server (must be called LUAROCKS_API_KEY).
  2. the release-please CI action for semver releases requires a GitHub token with read-only permissions with only write permissions for CI stuff according to the documentation (must be called PAT).

It's already a little late here, so I'll get them to you early tomorrow if that's okay 🙂

@natecraddock natecraddock merged commit d746bfa into natecraddock:master Jun 23, 2024
@mrcjkb mrcjkb deleted the luarocks branch June 23, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package for LuaRocks
3 participants