Skip to content

Commit d430ded

Browse files
authored
chore: use luarocks-tag-release action for luarocks upload (#458)
* chore: use luarocks-tag-release action for luarocks upload * docs(readme): add luarocks badge
1 parent 706bd3f commit d430ded

7 files changed

Lines changed: 53 additions & 39 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@ jobs:
88
runs-on: ubuntu-22.04
99
steps:
1010
- uses: actions/checkout@v3
11-
- uses: leafo/gh-actions-lua@v9
12-
with:
13-
luaVersion: "luajit-2.1.0-beta3"
14-
- uses: leafo/gh-actions-luarocks@v4
15-
- name: Install dkjson
16-
run: luarocks install dkjson
17-
- name: Luarocks Upload
18-
env:
11+
- name: LuaRocks Upload
12+
uses: nvim-neorocks/[email protected]
13+
env:
1914
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
20-
run: make luarocks_upload
21-
- name: Install release
22-
run: make test_luarocks_install
15+
with:
16+
summary: "lua functions you don't want to write"
17+
detailed_description: |
18+
plenary: full; complete; entire; absolute; unqualified.
19+
All the lua functions I don't want to write twice.
20+
template: "./rockspec.template"
21+

Makefile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,3 @@ generate_filetypes:
77

88
lint:
99
luacheck lua/plenary
10-
11-
luarocks_upload:
12-
bash ./scripts/luarocks-upload.sh
13-
14-
test_luarocks_install:
15-
bash ./scripts/test-luarocks-install.sh

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ At the moment, it is very much in pre-alpha :smile: Expect changes to the way so
1212

1313
## Installation
1414

15+
[![LuaRocks](https://img.shields.io/luarocks/v/Conni2461/plenary.nvim?logo=lua&color=purple)](https://luarocks.org/modules/Conni2461/plenary.nvim)
16+
1517
Using [plug](https://github.com/junegunn/vim-plug):
1618

1719
```vim

plenary.nvim-scm-1.rockspec

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,9 @@ dependencies = {
1919
}
2020

2121
source = {
22-
url = 'http://github.com/nvim-lua/plenary.nvim/archive/v' .. _MODREV .. '.zip',
23-
dir = 'plenary.nvim-' .. _MODREV,
22+
url = 'git://github.com/nvim-lua/plenary.nvim',
2423
}
2524

26-
if _MODREV == 'scm' then
27-
source = {
28-
url = 'git://github.com/nvim-lua/plenary.nvim',
29-
}
30-
end
31-
3225
build = {
3326
type = 'builtin',
3427
copy_directories = {

rockspec.template

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
local git_tag = '$git_tag'
2+
local modrev = '$modrev'
3+
local specrev = '-1'
4+
5+
local repo_url = '$repo_url'
6+
7+
rockspec_format = '3.0'
8+
package = '$package'
9+
version = modrev .. specrev
10+
11+
description = {
12+
summary = '$summary',
13+
detailed = $detailed_description,
14+
labels = $labels,
15+
homepage = '$homepage',
16+
$license
17+
}
18+
19+
dependencies = {
20+
'lua >= 5.1, < 5.4',
21+
'luassert'
22+
}
23+
24+
source = {
25+
url = repo_url .. '/archive/' .. git_tag .. '.zip',
26+
dir = '$repo_name-' .. modrev,
27+
}
28+
29+
build = {
30+
type = 'builtin',
31+
copy_directories = {
32+
'data',
33+
'plugin'
34+
}
35+
}
36+
37+
test = {
38+
type = 'command',
39+
command = 'make test'
40+
}

scripts/luarocks-upload.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.

scripts/test-luarocks-install.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)