-
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.
- Loading branch information
1 parent
5ee1a3e
commit 14ffe1f
Showing
10 changed files
with
325 additions
and
216 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,24 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: php-actions/composer@v6 | ||
with: | ||
# Lowest supported PHP version | ||
php_version: "7.4" | ||
- run: composer run package | ||
- name: Release | ||
uses: fnkr/github-action-ghr@v1 | ||
env: | ||
GHR_COMPRESS: zip | ||
GHR_PATH: releases/ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,3 +98,4 @@ vendor | |
!/src/vendor | ||
|
||
tests/coverage | ||
releases |
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
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
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,31 @@ | ||
#!/bin/bash | ||
|
||
## Remove old packages | ||
rm -rf ./releases | ||
mkdir -p ./releases | ||
|
||
# Copy current dir to tmp | ||
rsync \ | ||
-ua \ | ||
--exclude='vendor/*' \ | ||
--exclude='releases/*' \ | ||
./ ./releases/pdc-base/ | ||
|
||
# Remove current vendor folder (if any) | ||
# and install the dependencies without dev packages. | ||
cd ./releases/pdc-base || exit | ||
composer install -o --no-dev | ||
|
||
# Remove unneeded files in a WordPress plugin | ||
rm -rf ./.git ./composer.json ./.gitignore ./.editorconfig ./.eslintignore \ | ||
./.eslintrc ./.php-cs-fixer.php ./composer.lock ./bin \ | ||
./phpstan.neon.dist ./phpunit.xml.dist ./tests \ | ||
./DOCKER_ENV ./docker_tag ./output.log ./.github | ||
|
||
cd ../ | ||
|
||
# Create a zip file from the optimized plugin folder | ||
zip -rq pdc-base.zip ./pdc-base | ||
rm -rf ./pdc-base | ||
|
||
echo "Zip completed @ $(pwd)/pdc-base.zip" |
This file was deleted.
Oops, something went wrong.
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.