Skip to content

Commit

Permalink
Merge pull request #257 from markkelnar/ci-zip-file-excludes
Browse files Browse the repository at this point in the history
Use .distignore when build artifact for github release
  • Loading branch information
markkelnar authored Aug 31, 2023
2 parents fe9acaa + ea43cd5 commit 6bf0416
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 49 deletions.
50 changes: 23 additions & 27 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions .github/workflows/upload-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 6 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6bf0416

Please sign in to comment.