name: "luarocks"
on:
  push:
    tags:
      - 'v*'
  pull_request: # To make sure the package can build - does not publish
jobs:
  luarocks-upload:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
      - name: LuaRocks Upload
        uses: nvim-neorocks/luarocks-tag-release@v5
        env:
          LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
        with:
          dependencies: |
            jsregexp >= 0.0.5, <= 0.0.7
