Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Files and directories excluded from git archive / release zips.
# The leading slash anchors a pattern to the repo root so that e.g.
# /vendor/ is excluded but includes/vendor/ is kept.

/.github/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.wp-env.json export-ignore
/_build/ export-ignore
/docs/ export-ignore
/tests/ export-ignore
/vendor/ export-ignore
/composer.json export-ignore
/composer.lock export-ignore
/phpunit.xml export-ignore
/phpcs.xml export-ignore
/GitVersion.yml export-ignore
/README.md export-ignore
37 changes: 4 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,23 +78,11 @@ jobs:
- uses: actions/checkout@v6

- name: Stage plugin under its slug directory
env:
VERSION: ${{ needs.version.outputs.fullSemVer }}
run: |
mkdir -p /tmp/ipquery
rsync -a \
--exclude='.git' \
--exclude='.github' \
--exclude='.gitignore' \
--exclude='.wp-env.json' \
--exclude='docs' \
--exclude='tests' \
--exclude='/vendor' \
--exclude='composer.json' \
--exclude='composer.lock' \
--exclude='phpunit.xml' \
--exclude='phpcs.xml' \
--exclude='GitVersion.yml' \
--exclude='README.md' \
./ /tmp/ipquery/
git archive HEAD | tar -x -C /tmp/ipquery

- name: Run WordPress Plugin Check
uses: wordpress/plugin-check-action@v1
Expand Down Expand Up @@ -155,24 +143,7 @@ jobs:
env:
VERSION: ${{ needs.version.outputs.fullSemVer }}
run: |
mkdir -p /tmp/ipquery
rsync -a \
--exclude='.git' \
--exclude='.github' \
--exclude='.gitignore' \
--exclude='.wp-env.json' \
--exclude='docs' \
--exclude='tests' \
--exclude='/vendor' \
--exclude='composer.json' \
--exclude='composer.lock' \
--exclude='phpunit.xml' \
--exclude='phpcs.xml' \
--exclude='GitVersion.yml' \
--exclude='README.md' \
./ /tmp/ipquery/
cd /tmp
zip -r "ipquery-${VERSION}.zip" ipquery/
git archive HEAD --format=zip --prefix=ipquery/ --output="/tmp/ipquery-${VERSION}.zip"
echo "ZIP=/tmp/ipquery-${VERSION}.zip" >> "$GITHUB_ENV"

- name: Publish GitHub Release
Expand Down
16 changes: 1 addition & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,7 @@ jobs:
- name: Stage plugin under its slug directory
run: |
mkdir -p /tmp/ipquery
rsync -a \
--exclude='.git' \
--exclude='.github' \
--exclude='.gitignore' \
--exclude='.wp-env.json' \
--exclude='docs' \
--exclude='tests' \
--exclude='/vendor' \
--exclude='composer.json' \
--exclude='composer.lock' \
--exclude='phpunit.xml' \
--exclude='phpcs.xml' \
--exclude='GitVersion.yml' \
--exclude='README.md' \
./ /tmp/ipquery/
git archive HEAD | tar -x -C /tmp/ipquery

- name: Run WordPress Plugin Check
uses: wordpress/plugin-check-action@v1
Expand Down
Loading