diff --git a/.distignore b/.distignore index 2741424e..1acdb8fa 100644 --- a/.distignore +++ b/.distignore @@ -3,62 +3,58 @@ .deployignore .distignore .editorconfig +.env +.env.dist +.env.testing .eslintignore .eslintrc .git +.gitattributes .gitignore .github .gitlab-ci.yml .idea +.log .travis.yml .DS_Store .vscode .wordpress-org -Thumbs.db behat.yml bitbucket-pipelines.yml bin .circleci/config.yml +codeception.dist.yml +codeception.yml composer.json composer.lock +c3.php +CHANGELOG.md dependencies.yml +docker-compose.yml +/docker +/docker-output +/docs Gruntfile.js -package.json -package-lock.json -phpunit.xml -phpunit.xml.dist multisite.xml multisite.xml.dist +node_modules +package.json +package-lock.json .phpcs.xml phpcs.xml .phpcs.xml.dist phpcs.xml.dist +phpstan.neon.dist +/phpstan +phpunit.xml +phpunit.xml.dist +/plugin-build README.md +tests +Thumbs.db webpack.config.js wp-cli.local.yml yarn.lock -tests -node_modules *.sql *.tar.gz *.zip -/docs -/plugin-build -/.log -.env -.env.dist -phpcs.xml -phpstan.neon.dist -phpunit.xml.dist -README.md -docker-compose.yml -codeception.dist.yml -codeception.yml -composer.json -composer.lock -c3.php -CHANGELOG.md -.gitattributes -.gitignore -/docker -/docker-output diff --git a/.github/workflows/upload-plugin-zip.yml b/.github/workflows/upload-plugin-zip.yml index 9d2bdc21..b1c50356 100644 --- a/.github/workflows/upload-plugin-zip.yml +++ b/.github/workflows/upload-plugin-zip.yml @@ -17,15 +17,15 @@ jobs: run: | composer install --no-dev --optimize-autoloader - name: Create Artifact + # Create a zip file similar to 10up/action-wordpress-plugin-deploy action run: | - mkdir plugin-build - composer archive -vvv --format=zip --file="plugin-build/wp-graphql-smart-cache" + composer run-script zip - name: Upload artifact uses: actions/upload-artifact@v2 with: - name: wp-graphql-smart-cache - path: plugin-build/wp-graphql-smart-cache.zip + name: wpgraphql-smart-cache + path: plugin-build/wpgraphql-smart-cache.zip - name: Upload release asset uses: softprops/action-gh-release@v1 with: - files: plugin-build/wp-graphql-smart-cache.zip + files: plugin-build/wpgraphql-smart-cache.zip diff --git a/composer.json b/composer.json index 61919ed9..14291579 100644 --- a/composer.json +++ b/composer.json @@ -54,25 +54,14 @@ ], "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/" ] }, - "archive": { - "exclude": [ - "*.yml", - "*.zip", - ".env*", - "!.wordpress-org/", - "!build", - "docker/", - "docs/", - "node_modules/", - "packages", - "plugin-build/", - "tests/", - "!vendor/", - "wp-content/" - ] - }, "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true,