Featured image of post How to Automate the Wordpress Plugin Upload With Github Actions ?

How to Automate the Wordpress Plugin Upload With Github Actions ?

learn to Automate the Wordpress Plugin Upload With Github Actions to svn repository.

Hello Friends, 👋 today we will learn about something interesting which is automation for wordoress svn repository.

Automation is fun and make us more productive.

Introduction

I recommand you to open side by side this github link Plugin Repo to understand properly.

First of all we need atleast one plugin hosted in the Wordpress Plugin directory.

Get started

  • Upload Your plugin to github

  • after uplaoding your plugin

goto actions > setup new workflow yourself

setup new workflow in github

Click To Copy Workflow File and paste on your File.

change the plugin url and other stuff that you want to ingnore.Like i have ingnored readme.md etc.

Creating Secrets on Github

For Doing That goto settings of Repository.

Click on Secret Tab.

Screenshot from 2020-07-05 17-50-31

Then add New As mentions in the Workflow file.

1
2
3
WORDPRESS_PASSWORD

WORDPRESS_USERNAME

By doing this setup done.

How to upload on wordpress

As mentions on Workflow file we will run this setup on every tag release.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
name: Deploy
on:
  push:
    tags:
      - '*'
jobs:
  tag:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: WordPress Plugin Deploy
      #see rtCamp  repo for the 
      uses: rtCamp/action-wordpress-org-plugin-deploy@master
      env:
        #CUSTOM_COMMAND: ''
        #CUSTOM_PATH: ''
        EXCLUDE_LIST: docker-compose.yml README.md _config.yml
        SLUG: wp-post-views
        WORDPRESS_PASSWORD: ${{ secrets.WORDPRESS_PASSWORD }}
        WORDPRESS_USERNAME: ${{ secrets.WORDPRESS_USERNAME }}

To release tag Goto your Release Then Click Draft a new Release.

when you create new relese do not forgot to change your plugin version and readme.txt file version



If it is helpful and saves your valuable Time ⏱ please show your support 👇. Buy Me A Coffee
Buy me A Coffee, Thank you and canva ( For Beautiful designs ). Thanks for the reading 👍.
Built with Hugo
Theme Stack designed by Jimmy