In this repository you'll find GitHub workflows that you can use in your projects.
For information about developing plugins and themes for ClassicPress visit the Plugin Guidelines and Theme Guidelines.
Remember to check that the Action permissions in your repository under Settings -> Actions -> General screen is set to "Workflow permissions" -> "Read and write permissions".
The following information applies to plugins and themes that are submitted to and listed in the CP Directory.
This workflow creates a properly crafted ZIP file and attaches this file to your release.
You can also add a ZIP file (that contains your plugin or theme) from elsewhere. See the Plugin Directory Requirements and Theme Directory Requirements for instructions.
-
In your repo create a folder called
.github/workflowsand add fileadd-zip-to-release.ymlfrom theworkflowsfolder of this repository. -
This workflow uses your repository name as folder name, so change it if you have to do something more specific.
-
Create a file called
.gitattributeson top of your repo to exclude specific folders and files from your release (such as folder.github/workflowsand file.gitattributes). Example:.github export-ignore .gitattributes export-ignore .gitignore export-ignore
Follow these steps to release a new version:
- From your repository go to "Releases".
- Draft a new release.
- In the "Select tag" dropdown click "Create new tag".
- Enter (new) version number. Please respect Semantic Versioning.
-
Enter a title and a description for your release.
-
Click on publish.
-
Leave the workflow time to run. You'll get the ZIP file attached to the release.
-
In your repo create a folder called
.github/workflowsand add filecpcs.ymlfrom theworkflowsfolder of this repository. -
Edit
cpcs.ymlon line 21 to reflect your Text Domain.sed -i '/MY_DOMAIN/ s//CHANGE-THIS-TO-YOUR-TEXT-DOMAIN/' phpcs.xml ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The workflow is triggered on Pull request creation. You'll see if the test is passing. If it fails you'll see in your PR.
You can check what is failing from the annotations in the "Files changed" tab.
Also in the "Actions" tab you'll find cpcs output.