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.
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
).
- 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
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.
-
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 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 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 "File changed" tab.
Also in the Action Summary you'll find cpcs
output.