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: add luarocks upload release workflow #2381

Merged
merged 1 commit into from
Jan 8, 2023
Merged

Conversation

mrcjkb
Copy link
Contributor

@mrcjkb mrcjkb commented Jan 6, 2023

The recently added rockspec (see #2307) has to be prepared and uploaded to luarocks for each release.

This adds an automated workflow for it, which has been tested with plenary.nvim.

To be able to upload to luarocks, the owner of the luarocks account will have to add an API key named LUAROCKS_API_KEY to this repo's GitHub Actions secrets.

github-add-luarocks-api-key

The recently added rockspec (see neovim#2307) has to be prepared and
uploaded to luarocks for each release.

This adds an automated workflow for it, which has been tested with
plenary.nvim.

To be able to upload to luarocks, the owner of the luarocks account
will have to add an API key named `LUAROCKS_API_KEY` to this repo's
GitHub Actions secrets.
@glepnir glepnir requested a review from teto January 7, 2023 00:47
@teto
Copy link
Member

teto commented Jan 7, 2023

thanks for that, I will merge once we agree with the team what LUAROCKS_API_KEY to provide. I have no experience with creating github actions but considering the work you've already done to propose this workflow in various plugins, maybe creating a Github action could be a good idea (and once it works even move it to the https://github.com/nvim-lua/ org ?)

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Jan 7, 2023

maybe creating a Github action could be a good idea (and once it works even move it to the https://github.com/nvim-lua/ org ?)

I have been considering that, too :)

@teto teto merged commit 2df0fbd into neovim:master Jan 8, 2023
@teto
Copy link
Member

teto commented Jan 8, 2023

I have been considering that, too :)

that would be a game changer (even outside neovim ecosystem), this along with packer/lazy luarocks support.

I've added a LUAROCKS_API_KEY let's see

@justinmk
Copy link
Member

justinmk commented Jan 8, 2023

I've added a LUAROCKS_API_KEY let's see

would be a good time to add a "Release" section to the readme.md and mention this

@teto
Copy link
Member

teto commented Jan 8, 2023

I pushed a tag manually to trigger the pipeline. It failed when trying to install nvim-lspconfig
https://github.com/neovim/nvim-lspconfig/actions/runs/3868300639/jobs/6593652025
maybe because the package was not present in luarocks' "root" manifest . Also there was an existing lspconfig package I had uploaded under my account. I removed the latter and retriggered the job which now fails because the version already exists:
https://github.com/neovim/nvim-lspconfig/actions/runs/3868300639/jobs/6593683541
The annoying bit is that it prevents the install job from running so I think this should become a warning instead of an error in our pipeline.
I've tested the install locally and it worked splendidly

➜ luarocks install --local nvim-lspconfig
Installing https://luarocks.org/nvim-lspconfig-0.1.5-1.src.rock

nvim-lspconfig 0.1.5-1 depends on lua 5.1 (5.1-1 provided by VM)
nvim-lspconfig 0.1.5-1 is now installed in /home/teto/.luarocks (license: Apache/2.0)

Checking stability of dependencies in the absence of
nvim-lspconfig 0.1.4-2...

Removing nvim-lspconfig 0.1.4-2...
Removal successful.

@mrcjkb
Copy link
Contributor Author

mrcjkb commented Jan 9, 2023

The annoying bit is that it prevents the install job from running so I think this should become a warning instead of an error in our pipeline.

I guess releases failing because a version already exists shouldn't happen too often.
But I will look into that when creating the workflow next week.

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.

3 participants