GitHub actions for WordPress by different authors, and how to use them. Watch my talk on WordSesh.
This action is triggered whenever a Git tag is released in your GitHub repository. It automates the deployment of all the contents in the tag to the WordPress.org SVN repository.
Whenever a new tag is published.
-
Inside your plugin repository on GitHub, create a
.github/workflows/deploy.ymlfile. -
Use this code:
name: Deploy to WordPress.org
on:
push:
tags:
- '*'
jobs:
tag:
name: WordPress.org Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: WordPress Plugin Deploy
uses: 10up/actions-wordpress/dotorg-plugin-deploy@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: your-plugin-slug-
If your GitHub repository slug is not same as the WordPress slug, add the wordpress slug.
-
By default this actions pulls your assets from
.wordpress-orgfolder in your GitHub repository. You can either rename your current assets folder to.wordpress-orgor customize it usingASSETS_DIRvariable. -
Commit the file.
-
Go to your repository settings. In the Secrets tab, create two secrets
secrets.SVN_PASSWORDandsecrets.SVN_USERNAMEand add the credentials as their values.
The action will run itself each time you tag a release 🎉
This action will watch for any changes to readme.txt and plugin assets (Icons, Screenshots) on your Git repository and deploy them to the SVN repository. This action can also be run in tandem with the first Deploy Action.
With each push to the master branch that updates assets/readme.
-
Inside your plugin repository on GitHub, create a
.github/workflows/deploy.ymlfile. -
Copy the sample workflow file into yours
-
If your GitHub repository slug is not same as the WordPress slug, add the wordpress slug.
-
By default this actions expects these assets to be in
.wordpress-orgfolder in your GitHub repository. You can either rename your current assets folder to.wordpress-orgor customize it usingASSETS_DIRvariable after the slug variable. -
Commit the file.
-
Go to your repository settings. In the Secrets tab, create two secrets
secrets.SVN_PASSWORDandsecrets.SVN_USERNAMEand add the credentials as their values.
This action will run whenever you push changes to assets to master 🎉
Node based CLI which automates deployments even further. Follow Ahmads article for details and usage.
Runs PHPCS Code review for every pull request.
Whenever a new pull request is created.
-
Inside your plugin repository on GitHub, create a
.github/workflows/deploy.ymlfile. -
Copy the workflow file given at the action's homepage. Commit it.
-
Use a Bot account and create a personal access token, make sure to copy it.
-
Go back to your repo, inside settings > secrets, create a new secret. Initialize it with the token's value.
The action will run whenever a pull request is created.
This action is based on CI (Continuous Integration). Matrix testing describes the task of testing a software on different version of the programming language or other factors. This action runs unit tests your plugin on different php versions to test your plugins compatibility with them.
This Action Generates POT Files for your wordpress Plugin / Theme based on the content inside Github Repo.
If you document the hooks (actions and filters) in your WordPress project using the JSDoc standard, you can automatically turn that into a reader-friendly resource using this guide! This workflow uses a combination of a build process and an Action to publish documentation to GitHub Pages so you don't have to separately worry about keeping your documentation up to date and publicly available.