Skip to content

Commit 4e72470

Browse files
committed
Update publish-luarocks.yaml workflow
1 parent bee89be commit 4e72470

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Diff for: .github/workflows/publish-luarocks.yaml

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,35 @@
11
name: LuaRocks Release
2+
23
on:
3-
release:
4-
types: [created, published, edited]
4+
push:
5+
branches:
6+
- main
7+
58
jobs:
69
release:
710
runs-on: ubuntu-latest
11+
812
steps:
913
- name: Checkout code
1014
uses: actions/checkout@v2
15+
1116
- name: Set up Lua
1217
uses: leafo/gh-actions-lua@v8
1318
with:
1419
luaVersion: "5.4.0"
20+
1521
- name: Delete old rockspec files
1622
run: |
1723
git rm MathParser-*.rockspec || true
24+
1825
- name: Generate rockspec
1926
run: |
2027
lua build/generate_rockspec.lua ${GITHUB_REF#refs/tags/}
28+
2129
- name: Upload to LuaRocks
2230
run: |
2331
luarocks upload --api-key ${{ secrets.LUAROCKS_API_KEY }} MathParser-${GITHUB_REF#refs/tags/}.rockspec
32+
2433
- name: Add rockspec to repository
2534
run: |
2635
git config --local user.email "[email protected]"

0 commit comments

Comments
 (0)