Skip to content

Commit f18149a

Browse files
ci: luarocks scm version release workflow
1 parent ba08618 commit f18149a

File tree

3 files changed

+21
-5
lines changed

3 files changed

+21
-5
lines changed

.github/workflows/luarocks-scm.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ name: Luarocks release SCM
22

33
on:
44
workflow_dispatch: # allows manual triggering
5-
# TODO: run on scm file has been changed
5+
schedule:
6+
- cron: '0 0 * * *' # runs daily at 00:00
7+
pull_request: # Will test a local install without uploading to luarocks.org
68

79
jobs:
810
luarocks-upload:
@@ -11,15 +13,21 @@ jobs:
1113
- uses: actions/checkout@v4
1214
with:
1315
fetch-depth: 0 # Required to count the commits
14-
- name: LuaRocks Upload SCM
16+
- name: Set luarocks version
17+
run: echo "LUAROCKS_SPECREV=$(git log --oneline | wc -l)" >> $GITHUB_ENV
18+
- name: Get new commits
19+
run: echo "NEW_COMMIT_COUNT=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_ENV
20+
- name: LuaRocks Upload (scm)
1521
uses: nvim-neorocks/luarocks-tag-release@v7
22+
if: ${{ env.NEW_COMMIT_COUNT > 0 }}
1623
env:
1724
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
1825
with:
1926
version: scm
20-
specrev: 2 # FIXME: auto increment this!
27+
specrev: ${{ env.LUAROCKS_SPECREV }}
2128
detailed_description: |
22-
rest.nvim makes use of Lua cURL bindings to make HTTP requests so you don't have to leave Neovim to test your back-end codebase!
29+
A very fast, powerful, extensible and asynchronous Neovim HTTP client written in Lua.
30+
rest.nvim by default makes use of its own `curl` wrapper to make requests and a tree-sitter parser to parse http files.
2331
dependencies: |
2432
nvim-nio
2533
mimetypes

.github/workflows/luarocks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
env:
2424
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
2525
with:
26+
detailed_description: |
27+
A very fast, powerful, extensible and asynchronous Neovim HTTP client written in Lua.
28+
rest.nvim by default makes use of its own `curl` wrapper to make requests and a tree-sitter parser to parse http files.
2629
dependencies: |
2730
nvim-nio
2831
mimetypes

rest.nvim-scm-1.rockspec

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
-- HACK: this file isn't really needed for release because rest.nvim uses
2+
-- luarocks-tags-relase github action for actual relaeses, but it is here to be
3+
-- used for local testing
4+
15
---@diagnostic disable: lowercase-global
26
local MAJOR, REV = "scm", "-1"
37
rockspec_format = "3.0"
@@ -8,7 +12,8 @@ description = {
812
summary = "A fast and asynchronous Neovim HTTP client written in Lua",
913
labels = { "neovim", "rest" },
1014
detailed = [[
11-
rest.nvim makes use of Lua cURL bindings to make HTTP requests so you don't have to leave Neovim to test your back-end codebase!
15+
A very fast, powerful, extensible and asynchronous Neovim HTTP client written in Lua.
16+
rest.nvim by default makes use of its own `curl` wrapper to make requests and a tree-sitter parser to parse http files.
1217
]],
1318
homepage = "https://github.com/rest-nvim/rest.nvim",
1419
license = "GPLv3",

0 commit comments

Comments
 (0)