Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "release"
on:
push:
tags:
- '*'
jobs:
luarocks-upload:
runs-on: ubuntu-latest
steps:
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/checkout@v3
- name: LuaRocks Upload
uses: nvim-neorocks/luarocks-tag-release@v5
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
template: "rockspec.template"
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# https://github.com/luarocks/luarocks/wiki/Creating-a-Makefile-that-plays-nice-with-LuaRocks
build:
echo "Do nothing"

install:
deno task --quiet build:fast
bash -c "mkdir -p $(INST_LUADIR)"
cp -r app client lua public $(INST_LUADIR)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

### :electric_plug: Installation

[![LuaRocks](https://img.shields.io/luarocks/v/toppair/peek.nvim?logo=lua&color=purple)](https://luarocks.org/modules/toppair/peek.nvim)

```lua
use({ 'toppair/peek.nvim', run = 'deno task --quiet build:fast' })
```
Expand Down
48 changes: 48 additions & 0 deletions rockspec.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
local git_ref = '$git_ref'
local modrev = '$modrev'
local specrev = '-1'

local repo_url = '$repo_url'

rockspec_format = '3.0'
package = '$package'
version = modrev .. specrev

description = {
summary = '$summary',
detailed = [[
Features:
- live update
- synchronized scrolling
- github-style look
- TeX math
- Mermaid diagrams
]],
labels = $labels,
homepage = '$homepage',
$license
}

dependencies = $dependencies

source = {
url = repo_url .. '/archive/' .. git_ref .. '.zip',
dir = '$repo_name-' .. '$archive_dir_suffix',
}

if modrev == 'scm' then
source = {
url = 'git://github.com/toppair/$repo_name',
}
end

build = {
type = 'make',
install_variables = {
INST_PREFIX='$(PREFIX)',
INST_BINDIR='$(BINDIR)',
INST_LIBDIR='$(LIBDIR)',
INST_LUADIR='$(LUADIR)',
INST_CONFDIR='$(CONFDIR)',
},
}
5 changes: 5 additions & 0 deletions scripts/luarocks_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#/usr/bin/env bash

deno task --quiet build:fast
mkdir -p $(INST_LUADIR)
cp -r app client lua public $(INST_LUADIR)