Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Sep 5, 2023
2 parents 8b2ae52 + bdc4de6 commit 0a94b37
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased] - TBD

## [2.2.1] - 2023-09-05
### Fixed
- Ensure built files are included when used without a `BUILD_DIR` and `.distignore` file (props [@akirk](https://github.com/akirk), [@iamdharmesh](https://github.com/iamdharmesh) via [#130](https://github.com/10up/action-wordpress-plugin-deploy/pull/130)).
- Ensure a zip is generated when an existing version is found and the `generate-zip` input is set to `true` (props [@sy-records](https://github.com/sy-records), [@faisal-alvi](https://github.com/faisal-alvi) via [#133](https://github.com/10up/action-wordpress-plugin-deploy/pull/133)).

## [2.2.0] - 2023-05-18
### Added
- `DRY RUN` mode support that can be used while testing this action (props [@mukeshpanchal27](https://github.com/mukeshpanchal27), [@joemcgill](https://github.com/joemcgill), [@felixarntz](https://github.com/felixarntz), [@jeffpaul](https://github.com/jeffpaul), [@aaemnnosttv](https://github.com/aaemnnosttv), [@dkotter](https://github.com/dkotter), [@stephywells](https://github.com/stephywells) via [#122](https://github.com/10up/action-wordpress-plugin-deploy/pull/122), [#127](https://github.com/10up/action-wordpress-plugin-deploy/pull/127)).
Expand Down Expand Up @@ -74,6 +79,7 @@ All notable changes to this project will be documented in this file, per [the Ke
- Use more robust method of copying files (`-c` flag for `rsync`).

[Unreleased]: https://github.com/10up/action-wordpress-plugin-deploy/compare/stable...develop
[2.2.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.0...2.2.1
[2.2.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.1.1...2.2.0
[2.1.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.1.0...2.1.1
[2.1.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.0.0...2.1.0
Expand Down
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo

Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.

[Mark Jaquith (@markjaquith)](https://github.com/markjaquith), [Ciprian Popescu (@wolffe)](https://github.com/wolffe), [Léo Colombaro (@LeoColomb)](https://github.com/LeoColomb), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Vincenzo Russo (@vincenzo)](https://github.com/vincenzo), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Nikhil (@Nikschavan)](https://github.com/Nikschavan), [Niels Lange (@nielslange)](https://github.com/nielslange), [Stiofan O'Connor (@Stiofan)](https://github.com/Stiofan), [Sébastien SERRE (@sebastienserre)](https://github.com/sebastienserre), [Ram Ratan Maurya (@mauryaratan)](https://github.com/mauryaratan), [Johannes Siipola (@joppuyo)](https://github.com/joppuyo), [Felipe Elia (@felipeelia)](https://github.com/felipeelia), [Mobeen Abdullah (@mobeenabdullah)](https://github.com/mobeenabdullah), [Gaya Kessler (@Gaya)](https://github.com/Gaya), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [Grégory Viguier (@Screenfeed)](https://github.com/Screenfeed), [Pascal Knecht (@pascalknecht)](https://github.com/pascalknecht), [Stanislav Khromov (@khromov)](https://github.com/khromov), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Jakub Mikita (@Kubitomakita)](https://github.com/Kubitomakita), [Lucas Bustamante (@Luc45)](https://github.com/Luc45), [Thien Nguyen (@tatthien-zz)](https://github.com/tatthien-zz), [Shiva Poudel (@shivapoudel)](https://github.com/shivapoudel), [null (@nextgenthemes)](https://github.com/nextgenthemes), [Tom Usborne (@tomusborne)](https://github.com/tomusborne), [dean shmuel (@deanshmuel)](https://github.com/deanshmuel), [Peter Adams (@padams)](https://github.com/padams), [Kevin Batdorf (@KevinBatdorf)](https://github.com/KevinBatdorf), [Q (@qstudio)](https://github.com/qstudio), [null (@om4csaba)](https://github.com/om4csaba), [Roman Sapezhko (@shmidtelson)](https://github.com/shmidtelson), [null (@luizkim)](https://github.com/luizkim), [René Hermenau (@rene-hermenau)](https://github.com/rene-hermenau), [Lewis Cowles (@Lewiscowles1986)](https://github.com/Lewiscowles1986), [Dominik Schilling (@ocean90)](https://github.com/ocean90), [Santiago Becerra (@sanbec)](https://github.com/sanbec), [Marijn Bent (@marijnbent)](https://github.com/marijnbent), [Jasan (@jasan-s)](https://github.com/jasan-s), [Dale Nguyen (@dalenguyen)](https://github.com/dalenguyen), [Darren Cooney (@dcooney)](https://github.com/dcooney), [Karolína Vyskočilová (@vyskoczilova)](https://github.com/vyskoczilova), [Rafał Sztwiorok (@sztwiorok)](https://github.com/sztwiorok), [Alec Rust (@AlecRust)](https://github.com/AlecRust), [Jonny Harris (@spacedmonkey)](https://github.com/spacedmonkey), [Doeke Norg (@doekenorg)](https://github.com/doekenorg), [Andrew Heberle (@andrewheberle)](https://github.com/andrewheberle), [Takashi Hosoya (@tkc49)](https://github.com/tkc49), [Fabian Marz (@fabianmarz)](https://github.com/fabianmarz), [David Herron (@robogeek)](https://github.com/robogeek), [Sergey Kotlov (@sery0ga)](https://github.com/sery0ga), [Samuel Wood (@Otto42)](https://github.com/Otto42), [IgorChernenko (@igorchernenko92)](https://github.com/igorchernenko92), [Richard Muvirimi (@richard-muvirimi)](https://github.com/richard-muvirimi), [Dani Llewellyn (@diddledani)](https://github.com/diddledani), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Mukesh Panchal (@mukeshpanchal27)](https://github.com/mukeshpanchal27), [Joe McGill (@joemcgill)](https://github.com/joemcgill), [Felix Arntz (@felixarntz)](https://github.com/felixarntz), [Evan Mattson (@aaemnnosttv)](https://github.com/aaemnnosttv), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Stephanie Wells (@stephywells)](https://github.com/stephywells), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Jason Adams (@JasonTheAdams)](https://github.com/JasonTheAdams), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Uriahs Victor (@UVLabs)](https://github.com/UVLabs), [Simon Dowdles (@10upsimon)](https://github.com/10upsimon), [Volodymyr Kolesnykov (@sjinks)](https://github.com/sjinks), [Max Lyuchin (@cadic)](https://github.com/cadic), [Rahul Prajapati (@rahulsprajapati)](https://github.com/rahulsprajapati), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi).
[Mark Jaquith (@markjaquith)](https://github.com/markjaquith), [Ciprian Popescu (@wolffe)](https://github.com/wolffe), [Léo Colombaro (@LeoColomb)](https://github.com/LeoColomb), [Helen Hou-Sandi (@helen)](https://github.com/helen), [Vincenzo Russo (@vincenzo)](https://github.com/vincenzo), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Nikhil (@Nikschavan)](https://github.com/Nikschavan), [Niels Lange (@nielslange)](https://github.com/nielslange), [Stiofan O'Connor (@Stiofan)](https://github.com/Stiofan), [Sébastien SERRE (@sebastienserre)](https://github.com/sebastienserre), [Ram Ratan Maurya (@mauryaratan)](https://github.com/mauryaratan), [Johannes Siipola (@joppuyo)](https://github.com/joppuyo), [Felipe Elia (@felipeelia)](https://github.com/felipeelia), [Mobeen Abdullah (@mobeenabdullah)](https://github.com/mobeenabdullah), [Gaya Kessler (@Gaya)](https://github.com/Gaya), [Viktor Szépe (@szepeviktor)](https://github.com/szepeviktor), [Grégory Viguier (@Screenfeed)](https://github.com/Screenfeed), [Pascal Knecht (@pascalknecht)](https://github.com/pascalknecht), [Stanislav Khromov (@khromov)](https://github.com/khromov), [Tung Du (@dinhtungdu)](https://github.com/dinhtungdu), [Jakub Mikita (@Kubitomakita)](https://github.com/Kubitomakita), [Lucas Bustamante (@Luc45)](https://github.com/Luc45), [Thien Nguyen (@tatthien-zz)](https://github.com/tatthien-zz), [Shiva Poudel (@shivapoudel)](https://github.com/shivapoudel), [null (@nextgenthemes)](https://github.com/nextgenthemes), [Tom Usborne (@tomusborne)](https://github.com/tomusborne), [dean shmuel (@deanshmuel)](https://github.com/deanshmuel), [Peter Adams (@padams)](https://github.com/padams), [Kevin Batdorf (@KevinBatdorf)](https://github.com/KevinBatdorf), [Q (@qstudio)](https://github.com/qstudio), [null (@om4csaba)](https://github.com/om4csaba), [Roman Sapezhko (@shmidtelson)](https://github.com/shmidtelson), [null (@luizkim)](https://github.com/luizkim), [René Hermenau (@rene-hermenau)](https://github.com/rene-hermenau), [Lewis Cowles (@Lewiscowles1986)](https://github.com/Lewiscowles1986), [Dominik Schilling (@ocean90)](https://github.com/ocean90), [Santiago Becerra (@sanbec)](https://github.com/sanbec), [Marijn Bent (@marijnbent)](https://github.com/marijnbent), [Jasan (@jasan-s)](https://github.com/jasan-s), [Dale Nguyen (@dalenguyen)](https://github.com/dalenguyen), [Darren Cooney (@dcooney)](https://github.com/dcooney), [Karolína Vyskočilová (@vyskoczilova)](https://github.com/vyskoczilova), [Rafał Sztwiorok (@sztwiorok)](https://github.com/sztwiorok), [Alec Rust (@AlecRust)](https://github.com/AlecRust), [Jonny Harris (@spacedmonkey)](https://github.com/spacedmonkey), [Doeke Norg (@doekenorg)](https://github.com/doekenorg), [Andrew Heberle (@andrewheberle)](https://github.com/andrewheberle), [Takashi Hosoya (@tkc49)](https://github.com/tkc49), [Fabian Marz (@fabianmarz)](https://github.com/fabianmarz), [David Herron (@robogeek)](https://github.com/robogeek), [Sergey Kotlov (@sery0ga)](https://github.com/sery0ga), [Samuel Wood (@Otto42)](https://github.com/Otto42), [IgorChernenko (@igorchernenko92)](https://github.com/igorchernenko92), [Richard Muvirimi (@richard-muvirimi)](https://github.com/richard-muvirimi), [Dani Llewellyn (@diddledani)](https://github.com/diddledani), [Peter Wilson (@peterwilsoncc)](https://github.com/peterwilsoncc), [Mukesh Panchal (@mukeshpanchal27)](https://github.com/mukeshpanchal27), [Joe McGill (@joemcgill)](https://github.com/joemcgill), [Felix Arntz (@felixarntz)](https://github.com/felixarntz), [Evan Mattson (@aaemnnosttv)](https://github.com/aaemnnosttv), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Stephanie Wells (@stephywells)](https://github.com/stephywells), [Siddharth Thevaril (@Sidsector9)](https://github.com/Sidsector9), [Jason Adams (@JasonTheAdams)](https://github.com/JasonTheAdams), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [Uriahs Victor (@UVLabs)](https://github.com/UVLabs), [Simon Dowdles (@10upsimon)](https://github.com/10upsimon), [Volodymyr Kolesnykov (@sjinks)](https://github.com/sjinks), [Max Lyuchin (@cadic)](https://github.com/cadic), [Rahul Prajapati (@rahulsprajapati)](https://github.com/rahulsprajapati), [Faisal Alvi (@faisal-alvi)](https://github.com/faisal-alvi), [Alex Kirk (@akirk)](https://github.com/akirk), [Lu Fei (@sy-records)](https://github.com/sy-records).

## Libraries

Expand Down
34 changes: 23 additions & 11 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,26 @@ svn update --set-depth infinity assets
svn update --set-depth infinity trunk
svn update --set-depth immediates tags

generate_zip() {
if $INPUT_GENERATE_ZIP; then
echo "Generating zip file..."

# use a symbolic link so the directory in the zip matches the slug
ln -s "${SVN_DIR}/trunk" "${SVN_DIR}/${SLUG}"
zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" "$SLUG"
unlink "${SVN_DIR}/${SLUG}"

echo "zip-path=${GITHUB_WORKSPACE}/${SLUG}.zip" >> "${GITHUB_OUTPUT}"
echo "✓ Zip file generated!"
fi
}

# Bail early if the plugin version is already published.
if [[ -d "tags/$VERSION" ]]; then
echo "ℹ︎ Version $VERSION of plugin $SLUG was already published";

generate_zip

exit
fi

Expand Down Expand Up @@ -96,6 +113,11 @@ if [[ "$BUILD_DIR" = false ]]; then
git config --global user.email "10upbot+github@10up.com"
git config --global user.name "10upbot on GitHub"

# Ensure git archive will pick up any changed files in the directory try.
test $(git ls-files --deleted) && git rm $(git ls-files --deleted)
git add .
git commit -m "Include build step changes"

# If there's no .gitattributes file, write a default one into place
if [[ ! -e "$GITHUB_WORKSPACE/.gitattributes" ]]; then
cat > "$GITHUB_WORKSPACE/.gitattributes" <<-EOL
Expand Down Expand Up @@ -173,16 +195,6 @@ else
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
fi

if $INPUT_GENERATE_ZIP; then
echo "Generating zip file..."

# use a symbolic link so the directory in the zip matches the slug
ln -s "${SVN_DIR}/trunk" "${SVN_DIR}/${SLUG}"
zip -r "${GITHUB_WORKSPACE}/${SLUG}.zip" "$SLUG"
unlink "${SVN_DIR}/${SLUG}"

echo "zip-path=${GITHUB_WORKSPACE}/${SLUG}.zip" >> "${GITHUB_OUTPUT}"
echo "✓ Zip file generated!"
fi
generate_zip

echo "✓ Plugin deployed!"

0 comments on commit 0a94b37

Please sign in to comment.