Skip to content

Commit 11b2f77

Browse files
Upload Teal Types to LuaRocks (#75)
This action runs when the `scripts/updated-rockspecs.txt` file changes. That file gets written out by the `generate_rockspecs` script. Eventually we can setup a GHA to open/update a PR with automatically generated rockspecs. That way after someone updates a teal type, we get a new PR with the generated rockspecs and `updated-rockspecs.txt` file which when merged will cause this workflow to run. Hopefully keeping these two separate will also allow for semi-manual intervention if needed. helps with #73
1 parent 0550030 commit 11b2f77

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

.github/workflows/upload-types.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Upload Teal Types to LuaRocks
2+
3+
on:
4+
push:
5+
branches: master
6+
paths:
7+
- scripts/updated-rockspecs.txt
8+
9+
jobs:
10+
Upload-Types:
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- uses: actions/checkout@master
15+
16+
- uses: luarocks/gh-actions-lua@master
17+
with:
18+
luaVersion: "5.4"
19+
- uses: luarocks/gh-actions-luarocks@master
20+
21+
- name: Upload Rockspecs
22+
env:
23+
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
24+
run: |
25+
cat ./scripts/updated-rockspecs.txt | xargs -n1 -I{} luarocks upload {} --api-key "$LUAROCKS_API_KEY"

scripts/updated-rockspecs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
./rockspecs/dkjson-tl-type-0.0.1-1.rockspec
4242
./rockspecs/SLAXML-tl-type-0.0.1-1.rockspec
4343
./rockspecs/lcurses-tl-type-0.0.1-1.rockspec
44-
./rockspecs/lpeg-tl-type-0.0.1-1.rockspec
44+
./rockspecs/lpeg-tl-type-0.0.1-1.rockspec

0 commit comments

Comments
 (0)