Skip to content

Workflows for plugins and themes developers provided by ClassicPress.

Notifications You must be signed in to change notification settings

ClassicPress/dev-workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

ClassicPress workflows for Plugins and Themes Developers

TOC: Add ZIP to release | Check with CPCS

In this repository you'll find GitHub workflows that you can use in your projects.

Remember to check Action permissions in your repository under Settings -> Actions -> General.

Add ZIP to release

This workflow creates and attach to your release a properly crafted ZIP file.

The ZIP file will be called <REPOSITORY-NAME>-<REF-NAME>.zip (example: doit-v9.0.5.zip) and expand to a folder called <REPOSITORY-NAME> (example: doit).

Setup

  • In your repo put add-zip-to-release.yml into .github/workflows.
  • This workflows use your repository name as folder name, so change it if you have to do something more specific.
  • Create a .gitattribute file on top of your repo to exclude specific files fron your release. As example:
    .github export-ignore
    .gitattributes export-ignore
    mystuff export-ignore
    .gitignore export-ignore
    

Usage

Follow those steps to release a new version:

  • From your repository go to "Releases".

  • Draft a new release.

  • In the "Choose a tag" dropdown put version number.

  • It will prompt "+ Create new tag: x.x.x on publish". Click on it.

    Create new tag
  • 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.

    Release created

Check with CPCS (ClassicPress Directory Coding Standard)

Setup

  • In your repo put cpcs.yml into .github/workflows.
  • Edit cpcs.yml on line 17 to reflect your Text Domain.
    sed -i '/MY_DOMAIN/ s//CHANGE-THIS-TO-YOUR-TEXT-DOMAIN/' phpcs.xml
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    

Usage

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.

image

You can check what is failing from the annotations in "File changed" tab.

image

Also in the Action Summary you'll find cpcs output.

image

About

Workflows for plugins and themes developers provided by ClassicPress.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published