Skip to content

Commit 5814732

Browse files
committed
👷 Add luarocks
1 parent 145990f commit 5814732

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,61 @@ jobs:
5757
needs: test
5858
uses: tree-sitter/workflows/.github/workflows/package-pypi.yml@main
5959

60+
luarocks:
61+
runs-on: ubuntu-latest
62+
needs: test
63+
steps:
64+
- uses: actions/checkout@v4
65+
- uses: leafo/gh-actions-lua@v12
66+
with:
67+
luaVersion: "5.1"
68+
- uses: leafo/gh-actions-luarocks@v6
69+
- name: Install dependencies
70+
run: |
71+
luarocks install tree-sitter-cli
72+
- uses: lumen-oss/luarocks-tag-release@v7
73+
env:
74+
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
75+
if: "! startsWith(github.ref, 'refs/tags/')"
76+
with:
77+
extra_luarocks_args: |
78+
--force
79+
version: scm
80+
template: tree-sitter-hlsplaylist-scm-1.rockspec
81+
- uses: lumen-oss/luarocks-tag-release@v7
82+
env:
83+
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
84+
if: startsWith(github.ref, 'refs/tags/')
85+
with:
86+
extra_luarocks_args: |
87+
--force
88+
template: tree-sitter-hlsplaylist-scm-1.rockspec
89+
- run: |
90+
luarocks install tree-sitter-hlsplaylist
91+
luarocks pack tree-sitter-hlsplaylist
92+
scripts/upload.sh ./*.rock
93+
env:
94+
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
95+
if: startsWith(github.ref, 'refs/tags/')
96+
97+
luarocks-macos:
98+
needs: luarocks
99+
runs-on: macos-latest
100+
if: startsWith(github.ref, 'refs/tags/')
101+
steps:
102+
- uses: actions/checkout@v4
103+
- uses: leafo/gh-actions-lua@v12
104+
with:
105+
luaVersion: "5.1"
106+
- uses: leafo/gh-actions-luarocks@v6
107+
- run: |
108+
luarocks install tree-sitter-cli
109+
luarocks install tree-sitter-hlsplaylist
110+
luarocks pack tree-sitter-hlsplaylist
111+
scripts/upload.sh ./*.rock
112+
env:
113+
LUAROCKS_API_KEY: ${{secrets.LUAROCKS_API_KEY}}
114+
60115
deploy-aur:
61116
needs: pypi
62117
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)