Skip to content

Commit c6a9c28

Browse files
committed
feat: rocks.nvim/luarocks support
1 parent f8c6b1e commit c6a9c28

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/workflows/luarocks.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Push to Luarocks
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
release:
8+
types:
9+
- created
10+
pull_request: # Runs test install without uploading
11+
workflow_dispatch: # Allows to trigger manually
12+
13+
jobs:
14+
luarocks-upload:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0 # Required to count the commits
20+
- name: Get Version
21+
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV
22+
- name: LuaRocks Upload
23+
uses: nvim-neorocks/luarocks-tag-release@v5
24+
env:
25+
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
26+
with:
27+
version: ${{ env.LUAROCKS_VERSION }}
28+
labels: |
29+
neovim
30+
tree-sitter
31+
summary: A fork of tree-sitter-org, for use with the orgmode Neovim plugin
32+
template: .github/workflows/tree-sitter-orgmode.rockspec.template
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
local git_ref = '$git_ref'
2+
local modrev = '$modrev'
3+
local specrev = '$specrev'
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+
labels = $labels,
14+
homepage = '$homepage',
15+
$license
16+
}
17+
18+
build_dependencies = {
19+
'luarocks-build-treesitter-parser >= 1.3.0',
20+
}
21+
22+
source = {
23+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
24+
dir = '$repo_name-' .. '$archive_dir_suffix',
25+
}
26+
27+
build = {
28+
type = "treesitter-parser",
29+
lang = "org",
30+
sources = { "src/parser.c", "src/scanner.c" },
31+
copy_directories = { "queries" },
32+
}

0 commit comments

Comments
 (0)