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: luarocks releases #2764

Merged
merged 6 commits into from
May 12, 2024
Merged

Conversation

insipx
Copy link
Contributor

@insipx insipx commented May 2, 2024

Hey 👋

Summary

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

See also:

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

Things done:

  • Add a workflow that publishes tags to luarocks.org when a tag or release is pushed.

Notes:

Important

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.

See also this guide.

@alex-courtis
Copy link
Member

This looks fantastic! We have the same process for nvim-webdevicons

Can I please ask you to refactor this to have the same layout/style as https://github.com/nvim-tree/nvim-web-devicons/blob/master/.github/workflows/release.yml

The key difference is the v* version tag; we don't want all master changes published.

@alex-courtis
Copy link
Member

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.

We have a key for the nvim-tree organisation - am I correct in assuming we can use that here?

the neovim and/or vim labels have to be added to the LuaRocks package manually

Yup, hit that one :)

rocks.nvim, a new luarocks-based plugin manager.

I like this.

@alex-courtis
Copy link
Member

v1.3.2 is ready to release: #2761

We han hold it back if we get luarocks release ready soon.

@insipx
Copy link
Contributor Author

insipx commented May 7, 2024

Hey! Sorry i've been delayed, just moved houses, i'll make sure to refactor to the same layout to get this ready for merge :)

@insipx
Copy link
Contributor Author

insipx commented May 8, 2024

We have a key for the nvim-tree organisation - am I correct in assuming we can use that here?

Yep, this should work!

@alex-courtis
Copy link
Member

Fantastic, many thanks!

Before I pull the trigger there is a tag issue to resolve: nvim-tree uses release please, which generates multiple SEMVER tags e.g.

* 76db7ed (tag: v1.3, tag: v1, tag: nvim-tree-v1.3.1) chore(master): release nvim-tree 1.3.1 (#2736)  github-actions[bot]  Tue Apr 30 11:12

The first release will be successful and all 3 tags will be pushed. Unfortunately the next release will reject the updated v1 and v1.3 tags as they are already present.

See latest nvim-web-devicons luarocks release exhibiting this reject for v0: https://github.com/nvim-tree/nvim-web-devicons/actions/runs/9041343035

What should do here? Some thoughts:

  1. force push like luarocks upload --force
  2. only use full SEMVER tags like v1.3.1
  3. delete v1.3 before pushing

Please tell us the "correct" way of handling these tags.

@alex-courtis alex-courtis changed the title feat: luarocks/rocks.nvim support chore: luarocks release, preparing for rocks.nvim May 12, 2024
@alex-courtis alex-courtis changed the title chore: luarocks release, preparing for rocks.nvim ci: luarocks release, preparing for rocks.nvim May 12, 2024
@alex-courtis alex-courtis changed the title ci: luarocks release, preparing for rocks.nvim ci: luarocks releases May 12, 2024
@alex-courtis alex-courtis merged commit acffab9 into nvim-tree:master May 12, 2024
6 checks passed
@alex-courtis
Copy link
Member

In the interests of speed, I've restricted the versions to full SEMVER 'v[0-9]+.[0-9]+.[0-9]+'. We can add major and major minor in the future if we need them.

Worked beautifully, many thanks @insipx !

https://luarocks.org/modules/nvim-tree/nvim-tree.lua

@alex-courtis
Copy link
Member

One last question @insipx :

I see the neorocks organisation. nvim-tree.lua is owned by the nvim-tree organisation instead of neorocks.

Should nvim-tree be part of neorocks?

@insipx
Copy link
Contributor Author

insipx commented May 13, 2024

@alex-courtis
Don't think so, I as able to Rocks install nvim-tree.lua using the rocks plugin for neovim, so it seems everything is working as intended!

Thanks for adding those extra commits! Glad this is now packaged :)

@alex-courtis
Copy link
Member

@alex-courtis Don't think so, I as able to Rocks install nvim-tree.lua using the rocks plugin for neovim, so it seems everything is working as intended!

Thanks for adding those extra commits! Glad this is now packaged :)

Great news, thanks for getting all this together.

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