Skip to content

Commit

Permalink
Move zip command to composer scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
markkelnar committed Aug 30, 2023
1 parent 3841709 commit 9b8bd7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/upload-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ jobs:
- name: Create Artifact
# Create a zip file similar to 10up/action-wordpress-plugin-deploy action
run: |
mkdir wpgraphql-smart-cache
rsync -rc --exclude-from=.distignore --exclude=wpgraphql-smart-cache . wpgraphql-smart-cache/ --delete --delete-excluded -v
zip -r wpgraphql-smart-cache.zip wpgraphql-smart-cache
rm -rf wpgraphql-smart-cache
composer run-script zip
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
],
"phpstan": [
"phpstan analyze --ansi --memory-limit=1G"
],
"zip": [
"mkdir -p plugin-build/wpgraphql-smart-cache",
"rsync -rc --exclude-from=.distignore --exclude=plugin-build . plugin-build/wpgraphql-smart-cache/ --delete --delete-excluded -v",
"cd plugin-build ; zip -r wpgraphql-smart-cache.zip wpgraphql-smart-cache",
"rm -rf plugin-build/wpgraphql-smart-cache/"
]
},
"config": {
Expand Down

0 comments on commit 9b8bd7d

Please sign in to comment.