hrsh7th / nvim-cmp

A completion plugin for neovim coded in Lua.
MIT License
7.86k stars 393 forks source link

ci: automated releases and luarocks uploads #1923

Open mrcjkb opened 4 months ago

mrcjkb commented 4 months ago

Hey :wave:

This PR introduces a release-please workflow that automatically opens (or updates) a release PR (which updates a changelog) when a conventional commit is merged into the main branch.

Here's an example of what a release PR looks like:

The nice thing about this workflow is that you get to decide when to merge a release PR. When doing so, the same workflow creates a release tag and publishes a GitHub release, with the (SemVer) version bump determined from the conventional commit messages.

If you add a personal access token to this repo's secrets (I assumed it to be named PAT in this PR), each release will automatically trigger a luarocks upload. I have modified the workflow file to work nicely with this.

[!IMPORTANT]

  • If you merge this as is, release-please will compute the version using previous conventional commit messages. As there has not been a release yet, it will likely start at version 1.0.0. You can change the initial version with a manifest file.
  • Commits that don't comply with the conventional commits spec won't be included in release notes. You could enforce this with a GitHub action. Personally, I haven't ever had a need to do so.
mrcjkb commented 3 months ago

@hrsh7th no interest in this?

The luarocks package and latest tag being so out of date is a bit of a footgun for luarocks/rocks.nvim users.

max397574 commented 3 months ago

The luarocks package and latest tag being so out of date is a bit of a footgun for luarocks/rocks.nvim users.

and this days also lazy.nvim it could happen that it automatically uses the rockspec with the outdated things

mrcjkb commented 2 months ago

Since we haven't received a response, we've removed nvim-cmp 0.0.1 from the luarocks.org root manifest and uploaded a dev one (which installs from scm).

This isn't ideal, because dev rocks can't be pinned to a revision, but at least luarocks/rocks.nvim users can use an up-to-date version of this plugin.

If you ever decide to merge this, please let me know, because we will have to relinquish our rock.