-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for ClassicPress Directory (#19)
- Remove UpdateClient - Add proper headers - Add cpcs workflow - Add ZIP asset generation on release --------- Co-authored-by: xxsimoxx <simone@gieffeedizioni.it>
- Loading branch information
Showing
5 changed files
with
76 additions
and
869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: ClassicPress Directory Coding Standard checks. | ||
|
||
on: [pull_request, push] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
phpcs: | ||
name: CPCS | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: CPCS get rules | ||
run: | | ||
wget https://raw.githubusercontent.com/ClassicPress/ClassicPress-Coding-Standards/main/phpcs.xml | ||
sed -i '/^\t<!-- start config -->.*/a\ | ||
<file>.</file> | ||
' phpcs.xml | ||
sed -i '/MY_DOMAIN/ s//no-one/' phpcs.xml | ||
mv phpcs.xml phpcs.xml.dist | ||
- name: CPCS checks | ||
uses: 10up/wpcs-action@stable | ||
with: | ||
use_local_config: 'true' | ||
enable_warnings: 'true' | ||
extra_args: '--report-json=./phpcs.json' | ||
- name: Update summary | ||
run: | | ||
npm i -g github:10up/phpcs-json-to-md | ||
phpcs-json-to-md --path ./phpcs.json --output ./phpcs.md | ||
cat phpcs.md >> $GITHUB_STEP_SUMMARY | ||
if: always() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Generate Installable Plugin, and Upload as Release Asset | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
name: Upload Release Asset | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Install deps | ||
run: | | ||
composer install | ||
- name: setup git config | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
- name: Create artifact | ||
run : | | ||
rm -f .gitignore | ||
ls -lha | ||
git add vendor/* | ||
git archive -o ${{ github.event.repository.name }}-${{ github.ref_name }}.zip --prefix ${{ github.event.repository.name }}/ $(git write-tree) | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ github.event.repository.name }}-${{ github.ref_name }} | ||
path: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip | ||
- name: Upload to release | ||
uses: JasonEtco/upload-to-release@master | ||
with: | ||
args: ${{ github.event.repository.name }}-${{ github.ref_name }}.zip application/zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.