Skip to content

Commit 5633cdd

Browse files
committed
👷 Add luarocks-tag-release
1 parent c295ae5 commit 5633cdd

File tree

3 files changed

+57
-60
lines changed

3 files changed

+57
-60
lines changed

.github/workflows/main.yml

+6-24
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,13 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
20-
- uses: leafo/gh-actions-lua@v10
21-
- uses: leafo/gh-actions-luarocks@v4
22-
- name: Build
23-
run: |
24-
luarocks pack ./*.rockspec
25-
luarocks build
26-
luarocks pack prompt-style
27-
- uses: actions/upload-artifact@v3
28-
if: "! startsWith(github.ref, 'refs/tags/')"
19+
- uses: actions/checkout@v4
20+
- uses: nvim-neorocks/luarocks-tag-release@v5
21+
env:
22+
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
2923
with:
30-
path: |
31-
*.rock
32-
- uses: softprops/action-gh-release@v1
33-
if: startsWith(github.ref, 'refs/tags/')
34-
with:
35-
# body_path: build/CHANGELOG.md
36-
files: |
37-
*.rock
38-
- name: Upload
39-
if: startsWith(github.ref, 'refs/tags/')
40-
run: |
41-
# https://github.com/luarocks/luarocks/issues/559
42-
luarocks install dkjson
43-
luarocks upload ./*.rockspec --api-key ${{secrets.LUAROCKS_API_KEY}}
24+
template: template.rockspec
25+
name: prompt-style
4426

4527
deploy-aur:
4628
needs: build

prompt-style-0.0.1-0.rockspec

-36
This file was deleted.

template.rockspec

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
detailed = $detailed_description,
14+
labels = $labels,
15+
homepage = '$homepage',
16+
$license
17+
}
18+
19+
dependencies = {
20+
"lua >= 5.1",
21+
"ansicolors",
22+
"luafilesystem",
23+
"luaprompt"
24+
}
25+
26+
test_dependencies = $test_dependencies
27+
28+
source = {
29+
url = repo_url .. '/archive/' .. git_ref .. '.zip',
30+
dir = '$repo_name-' .. '$archive_dir_suffix',
31+
}
32+
33+
if modrev == 'scm' or modrev == 'dev' then
34+
source = {
35+
url = repo_url:gsub('https', 'git')
36+
}
37+
end
38+
39+
build = {
40+
type = 'builtin',
41+
modules = {["prompt-style"] = "prompt-style.lua"},
42+
install = {
43+
-- cannot use _VERSION
44+
bin = {
45+
"bin/nvimp",
46+
"bin/texluap",
47+
"bin/pandocp",
48+
"bin/neomuttp"
49+
},
50+
},
51+
}

0 commit comments

Comments
 (0)