# https://github.com/marketplace/actions/luarocks-tag-release
name: LuaRocks release
on:
  pull_request: # Will test a local install without uploading to luarocks.org
  workflow_dispatch: # makes it possible to run the workflow manually
  release:
    types:
      # Will upload to luarocks.org when a release is made
      - published

jobs:
  luarocks-release:
    runs-on: ubuntu-latest
    name: LuaRocks upload
    steps:
      - name: Checkout
        uses: actions/checkout@v4.2.2
      - name: LuaRocks Upload
        uses: nvim-neorocks/luarocks-tag-release@v7.2.0
        env:
          LUAROCKS_API_KEY: ${{ secrets.LUAROCKS_API_KEY }}
        with:
          # https://github.com/marketplace/actions/luarocks-tag-release#dependencies
          dependencies: |
            plenary.nvim
