name: Deploy to WordPress.org

on:
  workflow_dispatch:
  push:
    tags:
      - 'v*'

jobs:
  tag:
    name: New release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Install SVN
        run: |
          sudo apt-get update
          sudo apt-get install subversion

      - name: WordPress Plugin Deploy
        uses: 10up/action-wordpress-plugin-deploy@stable
        env:
          SLUG: ai-mind
          SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
          SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
