forked from milisims/tree-sitter-org
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from mrcjkb/main
feat: rocks.nvim/luarocks support
- Loading branch information
Showing
2 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Push to Luarocks | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
release: | ||
types: | ||
- created | ||
pull_request: # Runs test install on PR without uploading | ||
workflow_dispatch: # Allows to trigger manually | ||
|
||
jobs: | ||
luarocks-upload: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Required to count the commits | ||
- name: Get Version | ||
run: echo "LUAROCKS_VERSION=$(git describe --abbrev=0 --tags)" >> $GITHUB_ENV | ||
- name: Install C/C++ Compiler | ||
uses: rlalik/setup-cpp-compiler@master | ||
with: | ||
compiler: clang-latest | ||
- name: Install Lua | ||
uses: leso-kn/gh-actions-lua@master | ||
with: | ||
luaVersion: "5.1" | ||
- name: Install Luarocks | ||
uses: hishamhm/gh-actions-luarocks@master | ||
- name: Install `luarocks-build-treesitter-parser` Package | ||
run: | | ||
luarocks --verbose --local --lua-version=5.1 install luarocks-build-treesitter-parser | ||
- name: LuaRocks Upload | ||
uses: nvim-neorocks/luarocks-tag-release@v5 | ||
env: | ||
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} | ||
with: | ||
name: tree-sitter-orgmode | ||
version: ${{ env.LUAROCKS_VERSION }} | ||
labels: | | ||
neovim | ||
tree-sitter | ||
summary: A fork of tree-sitter-org, for use with the orgmode Neovim plugin | ||
template: .github/workflows/tree-sitter-orgmode.rockspec.template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
local git_ref = '$git_ref' | ||
local modrev = '$modrev' | ||
local specrev = '$specrev' | ||
|
||
local repo_url = '$repo_url' | ||
|
||
rockspec_format = '3.0' | ||
package = '$package' | ||
version = modrev ..'-'.. specrev | ||
|
||
description = { | ||
summary = '$summary', | ||
labels = $labels, | ||
homepage = '$homepage', | ||
$license | ||
} | ||
|
||
build_dependencies = { | ||
'luarocks-build-treesitter-parser >= 1.3.0', | ||
} | ||
|
||
source = { | ||
url = repo_url .. '/archive/' .. git_ref .. '.zip', | ||
dir = '$repo_name-' .. '$archive_dir_suffix', | ||
} | ||
|
||
build = { | ||
type = "treesitter-parser", | ||
lang = "org", | ||
sources = { "src/parser.c", "src/scanner.c" }, | ||
copy_directories = { "queries" }, | ||
} |