Skip to content

Commit

Permalink
ci: publish releases to luarocks
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Nov 22, 2024
1 parent a1772af commit 4f5510d
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/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 = '$specrev'

local repo_url = '$repo_url'

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

description = {
summary = '$summary',
detailed = $detailed_description,
labels = $labels,
homepage = '$homepage',
$license
}

dependencies = {
'lua == 5.1',
}

build_dependencies = {
'luarocks-build-rust-mlua',
}

test_dependencies = {
'nlua',
}

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

build = {
type = 'rust-mlua',
modules = {
'blink_cmp_fuzzy',
},
install = {
lua = {
['blink-cmp.init'] = 'lua/blink-cmp.lua',
},
},
default_features = false,
features = { 'lua51' },
}
31 changes: 31 additions & 0 deletions .github/workflows/luarocks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to luarocks

on:
push:
tags:
- 'v*'
release:
types: [published]
pull_request: # Will test a local install without uploading to luarocks.org
workflow_dispatch: # Allow triggering manually

jobs:
luarocks-upload:
runs-on: ubuntu-latest
name: Publish to luarocks
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
toolchain: nightly
- name: LuaRocks upload
uses: nvim-neorocks/luarocks-tag-release@v7
env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
with:
name: blink.cmp
summary: "Performant, batteries-included completion plugin for Neovim"
template: .github/rockspec.template

0 comments on commit 4f5510d

Please sign in to comment.