name: Plugin Asset/Readme Update

on:
  workflow_dispatch:
  push:
    branches:
      - main

jobs:
  trunk:
    name: Push to trunk
    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.org plugin asset/readme update
        uses: nk-crew/action-wordpress-plugin-asset-update@develop
        env:
          SLUG: ai-mind
          SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
          SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
