fix(ci): only run on tag push

This commit is contained in:
Barrett Ruth 2026-01-27 18:09:57 -05:00
parent 0b5c0f0c40
commit bd25f1db0b

View file

@ -1,17 +1,21 @@
name: luarocks name: luarocks
on: on:
workflow_run: push:
workflows: ["ci"] tags:
types: - "v*"
- completed
jobs: jobs:
ci:
uses: ./.github/workflows/ci.yml
publish: publish:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }} needs: ci
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- uses: nvim-neorocks/luarocks-tag-release@v7 - uses: nvim-neorocks/luarocks-tag-release@v7
env: env:
LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }} LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}