# This is a basic workflow to help you get started with Actions

name: Deploy to WordPress.org

# Controls when the workflow will run
on:
  # Triggers the workflow on push or pull request events but only for the main branch
  release:
    types: [published]

# Allows you to run this workflow manually from the Actions tab
# workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  tag:
    name: Plugin release
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v2
    - name: Lint
      run: |
        composer install
        composer run lint
    - name: WordPress Plugin Deploy
      id: deploy
      uses: 10up/action-wordpress-plugin-deploy@stable
      with:
        generate-zip: false
      env:
        SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
        SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
