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

ci: automatic releases + publish to luarocks #180

Merged
merged 1 commit into from
Dec 7, 2023
Merged

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented Dec 6, 2023

Hey 👋

Summary

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

Things done:

  • Add a release-please workflow that creates release PRs with SemVer versioning based on conventional commits
    (I noticed you've been using these recently).
  • Add a workflow that publishes tags to LuaRocks when a tag or release is pushed.

The workflows are based on this guide by @vhyrro.

Notes:

  • On each merge to main, 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, and a GitHub release, which will trigger the luarocks workflow.
  • Tagged releases are installed locally and then published to luarocks.org.
    On PRs, a test release is installed, but not published.
  • For the luarocks 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 (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.

@j-hui
Copy link
Owner

j-hui commented Dec 7, 2023

This is awesome, thanks for opening this PR!

I don't use rocks.nvim (and don't intend to invest time into switching anytime soon), but I'm happy to support this on a best-effort basis. In any case, this seems like a super convenient workflow for managing releases, which I just decided to start doing to snapshot the plugin before f7dde2b (a fairly large change).

I just created a LuaRocks account and added my API key as a secret, let's see if this works.

@j-hui j-hui merged commit 3cae7d9 into j-hui:main Dec 7, 2023
1 check passed
@j-hui
Copy link
Owner

j-hui commented Dec 7, 2023

@mrcjkb looks like it was published successfully! https://luarocks.org/modules/j-hui/fidget.nvim

I also added the tags you mentioned.

Can you take a look and let me know if this all worked as expected? And if so, can you make a PR that adds installation instructions to the README for installing using rocks.nvim? Thanks!

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Dec 7, 2023

🚀 it looks like it worked as intended.

And if so, can you make a PR that adds installation instructions to the README for installing using rocks.nvim?

Sure 😄
I usually add a luarocks badge that contains the current version (forgot about that).

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.

2 participants