Skip to content

Commit 0068ee4

Browse files
committed
Merge branch 'develop' into fix/distignore
2 parents 739c062 + 5b325a1 commit 0068ee4

7 files changed

Lines changed: 80 additions & 27 deletions

CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file, per [the Ke
44

55
## [Unreleased] - TBD
66

7+
## [2.3.0] - 2025-01-21
8+
### Added
9+
- Example workflow files to documentation (props [@jeffpaul](https://github.com/jeffpaul), [@AlecRust](https://github.com/AlecRust), [@helen](https://github.com/helen), [@peterwilsoncc](https://github.com/peterwilsoncc) via [#143](https://github.com/10up/action-wordpress-plugin-deploy/pull/143)).
10+
- Add comments to the example workflow file to help better explain what each step does (props [@tarecord](https://github.com/tarecord), [@jeffpaul](https://github.com/jeffpaul) via [#144](https://github.com/10up/action-wordpress-plugin-deploy/pull/144)).
11+
- Documentation update in the `README` with required `actions/checkout` step for clarity in example workflow (props [@frankiebordone](https://github.com/frankiebordone), [@jeffpaul](https://github.com/jeffpaul), [@faisal-alvi](https://github.com/faisal-alvi) via [#154](https://github.com/10up/action-wordpress-plugin-deploy/pull/154)).
12+
13+
### Changed
14+
- Update our example with a new release asset action (props [@Sidsector9](https://github.com/Sidsector9), [@jeffpaul](https://github.com/jeffpaul) via [#150](https://github.com/10up/action-wordpress-plugin-deploy/pull/150)).
15+
- Update action examples to show an svn install step (props [@thrijith](https://github.com/thrijith), [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#155](https://github.com/10up/action-wordpress-plugin-deploy/pull/155)).
16+
17+
### Fixed
18+
- Install svn as part of the workflow if needed (props [@kirtangajjar](https://github.com/kirtangajjar), [@scott-sharethis](https://github.com/scott-sharethis), [@Surbma](https://github.com/Surbma), [@alicolville](https://github.com/alicolville), [@tobeyadr](https://github.com/tobeyadr), [@fumikito](https://github.com/fumikito), [@dkotter](https://github.com/dkotter) via [#160](https://github.com/10up/action-wordpress-plugin-deploy/pull/160)).
19+
- Typo in the `README` file (props [@pedro-mendonca](https://github.com/pedro-mendonca), [@faisal-alvi](https://github.com/faisal-alvi) via [#145](https://github.com/10up/action-wordpress-plugin-deploy/pull/145)).
20+
21+
### Developer
22+
- Replaced `lee-dohm/no-response` with `actions/stale` to help with closing no-response/stale issues (props [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter) via [#147](https://github.com/10up/action-wordpress-plugin-deploy/pull/147)).
23+
724
## [2.2.2] - 2023-09-07
825
### Fixed
926
- Ensure the deploy action works properly when a `.distignore` file is not present (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#137](https://github.com/10up/action-wordpress-plugin-deploy/pull/137)).
@@ -83,6 +100,7 @@ All notable changes to this project will be documented in this file, per [the Ke
83100
- Use more robust method of copying files (`-c` flag for `rsync`).
84101

85102
[Unreleased]: https://github.com/10up/action-wordpress-plugin-deploy/compare/stable...develop
103+
[2.3.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.2...2.3.0
86104
[2.2.2]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.1...2.2.2
87105
[2.2.1]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.2.0...2.2.1
88106
[2.2.0]: https://github.com/10up/action-wordpress-plugin-deploy/compare/2.1.1...2.2.0

CREDITS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The following individuals are responsible for curating the list of issues, respo
1010

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

13-
[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).
13+
[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), [Tanner Record (@tarecord)](https://github.com/tarecord), [Frankie Bordone (@frankiebordone)](https://github.com/frankiebordone), [Thrijith Thankachan (@thrijith)](https://github.com/thrijith), [Pedro Mendonça (@pedro-mendonca)](https://github.com/pedro-mendonca), [Kirtan Gajjar (@kirtangajjar)](https://github.com/kirtangajjar), [Scott Adrian (@scott-sharethis)](https://github.com/scott-sharethis), [Peter Ambrus (@Surbma)](https://github.com/Surbma), [Ali Colville (@alicolville)](https://github.com/alicolville), [Adrian Tobey (@tobeyadr)](https://github.com/tobeyadr), [Takahashi Fumiki (@fumikito)](https://github.com/fumikito).
1414

1515
## Libraries
1616

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This Action commits the contents of your Git tag to the WordPress.org plugin rep
2929
### Inputs
3030

3131
* `generate-zip` - Defaults to `false`. Generate a ZIP file from the SVN `trunk` directory. Outputs a `zip-path` variable for use in further workflow steps.
32-
* `dry-run` - Defaults to `false`. Set this to `true` if you want to skip the final Subversion commit step (e.g., to debug prior to a non-dry-run commit).
32+
* `dry-run` - Defaults to `false`. Set this to `true` if you want to skip the final Subversion commit step (e.g., to debug prior to a non-dry-run commit). `dry-run` - `true` Doesn't require SVN secret.
3333

3434
### Outputs
3535

@@ -77,6 +77,12 @@ Current set of example workflow files:
7777

7878
* [Deploy on publishing a new release and attach a ZIP file to the release](examples/deploy-on-publishing-a-new-release-and-attach-a-zip-file-to-the-release.yml)
7979
* [Deploy on pushing a new tag](examples/deploy-on-pushing-a-new-tag.yml)
80+
81+
**Note**: The following step is required to check out the repository for use during the workflow run:
82+
```
83+
- uses: actions/checkout@v4
84+
```
85+
8086
* [Deploy on pushing a new tag and create release with attached ZIP](examples/deploy-on-pushing-a-new-tag-and-create-release-with-attached-zip.yml)
8187

8288
## Contributing

deploy.sh

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,59 @@
66
# it does not exit with 0, as we are interested in the final exit.
77
set -eo
88

9+
# Function to check if a command exists
10+
command_exists() {
11+
command -v "$1" >/dev/null 2>&1
12+
}
13+
14+
# Check if SVN is installed
15+
if command_exists svn; then
16+
echo "SVN is already installed."
17+
else
18+
echo "SVN is not installed. Installing SVN..."
19+
20+
# Update the package list
21+
sudo apt-get update -y
22+
23+
# Install SVN
24+
sudo apt-get install -y subversion
25+
26+
# Verify installation
27+
if command_exists svn; then
28+
echo "SVN was successfully installed."
29+
else
30+
echo "Failed to install SVN. Please check your system configuration."
31+
exit 1
32+
fi
33+
fi
34+
935
# Ensure SVN username and password are set
1036
# IMPORTANT: while secrets are encrypted and not viewable in the GitHub UI,
1137
# they are by necessity provided as plaintext in the context of the Action,
1238
# so do not echo or use debug mode unless you want your secrets exposed!
13-
if [[ -z "$SVN_USERNAME" ]]; then
14-
echo "Set the SVN_USERNAME secret"
15-
exit 1
16-
fi
17-
18-
if [[ -z "$SVN_PASSWORD" ]]; then
19-
echo "Set the SVN_PASSWORD secret"
20-
exit 1
21-
fi
2239

40+
# Check if it's a dry-run first
2341
if $INPUT_DRY_RUN; then
24-
echo "ℹ︎ Dry run: No files will be committed to Subversion."
42+
echo "ℹ︎ Dry run: No files will be committed to Subversion."
43+
44+
if [[ -z "$SVN_USERNAME" ]]; then
45+
echo "Warning: SVN_USERNAME is missing. The commit will fail if you attempt a real run."
46+
fi
47+
48+
if [[ -z "$SVN_PASSWORD" ]]; then
49+
echo "Warning: SVN_PASSWORD is missing. The commit will fail if you attempt a real run."
50+
fi
51+
else
52+
# If it's not a dry-run, check for SVN credentials
53+
if [[ -z "$SVN_USERNAME" ]]; then
54+
echo "Set the SVN_USERNAME secret"
55+
exit 1
56+
fi
57+
58+
if [[ -z "$SVN_PASSWORD" ]]; then
59+
echo "Set the SVN_PASSWORD secret"
60+
exit 1
61+
fi
2562
fi
2663

2764
# Allow some ENV variables to be customized
@@ -44,12 +81,12 @@ echo "ℹ︎ ASSETS_DIR is $ASSETS_DIR"
4481

4582
if [[ -z "$BUILD_DIR" ]] || [[ $BUILD_DIR == "./" ]]; then
4683
BUILD_DIR=false
47-
elif [[ $BUILD_DIR == ./* ]]; then
84+
elif [[ $BUILD_DIR == ./* ]]; then
4885
BUILD_DIR=${BUILD_DIR:2}
4986
fi
5087

5188
if [[ "$BUILD_DIR" != false ]]; then
52-
if [[ $BUILD_DIR != /* ]]; then
89+
if [[ $BUILD_DIR != /* ]]; then
5390
BUILD_DIR="${GITHUB_WORKSPACE%/}/${BUILD_DIR%/}"
5491
fi
5592
echo "ℹ︎ BUILD_DIR is $BUILD_DIR"

examples/deploy-on-publishing-a-new-release-and-attach-a-zip-file-to-the-release.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
run: |
5555
npm install
5656
npm run build
57+
5758
- name: WordPress Plugin Deploy
5859

5960
# You can add unique ids to specific steps if you want to reference their output later in the workflow.
@@ -80,21 +81,12 @@ jobs:
8081
# After the deploy, we also want to create a zip and upload it to the release on Github. We don't want
8182
# users to have to go to the repository to find our plugin :).
8283
- name: Upload release asset
83-
uses: actions/upload-release-asset@v1
84+
uses: softprops/action-gh-release@v2
8485
env:
8586
# Note, this is an exception to action secrets: GH_TOKEN is always available and provides access to
8687
# the current repository this action runs in.
8788
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8889

8990
with:
90-
# Get the URL for uploading assets to the current release.
91-
upload_url: ${{ github.event.release.upload_url }}
92-
93-
# Provide the path to the file generated in the previous step using the output.
94-
asset_path: ${{ steps.deploy.outputs.zip-path }}
95-
9691
# Provide what the file should be named when attached to the release (plugin-name.zip)
97-
asset_name: ${{ github.event.repository.name }}.zip
98-
99-
# Provide the file type.
100-
asset_content_type: application/zip
92+
files: ${{ github.workspace }}/${{ github.event.repository.name }}.zip

examples/deploy-on-pushing-a-new-tag-and-create-release-with-attached-zip.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
files: ${{github.workspace}}/${{ github.event.repository.name }}.zip
2929
env:
3030
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31-
31+

examples/deploy-on-pushing-a-new-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
2020
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
2121
SLUG: my-super-cool-plugin # optional, remove if GitHub repo name matches SVN slug, including capitalization
22-
22+

0 commit comments

Comments
 (0)