-
Notifications
You must be signed in to change notification settings - Fork 21
Release Process
We start to use GitHub workflow to automate the process. You will still need to use woorelease
locally and do a few steps manually in GitHub.
-
Open the "Run workflow" dropdown, fill in the details, and click "Run workflow" button.
-
Wait for the new release PR to be created by the github-actions[bot].
-
Follow the steps from the new PR. Some more hints and troubleshooting are provided below.
-
❗ While running smoke tests, remember: if this release has updated composer packages, we should test Composer package conflicts with other plugins.
We use the GitFlow branching model. Check out the PeeuvX-1D-p2 if you haven't already.
woorelease is used to deploy to WooCommerce.com: https://github.com/woocommerce/woorelease
⚠ IMPORTANT Some Woorelease pre-configuration is necessary:
- Download the
woorelease.zip
from the latest release, then unzip the archive and install thewoorelease.phar
to use locally. -
https://github.com/woocommerce/woorelease/wiki/Prerequisites
- Retrieve the Ventures WooCommerce.com API Keys (Secret store → "Team Ventures – WooCommerce.com").
- Generate your own GitHub API Keys.
- Ensure you have your SSH keys added to GitHub, as Woorelease uses SSH to clone repos.
- Log in your account and go to https://wordpress.org/plugins/google-listings-and-ads/advanced/
- Check if the **Committers** list is displayed at the right sidebar and your account is listed on it
Where is the temporary working folder for release processes? (git
/svn
/npm build
operations and google-listings-and-ads.zip
file)
- Get the folder path used for temporary files by `php -r 'echo sys_get_temp_dir()."/google-listings-and-ads\n";'`
- Retry by the `wporg:release` command of WooRelease tool
```
# Both --folder and --zip_file should point to the temporary folder just used for `wr release` in your system
# --folder=/<temporary folder in your system>/google-listings-and-ads
# --zip_file=/<temporary folder in your system>/google-listings-and-ads/google-listings-and-ads.zip
wr wporg:release --product_version=x.x.x --folder=/<tmp_folder>/google-listings-and-ads --zip_file=/<tmp_folder>/google-listings-and-ads/google-listings-and-ads.zip --release https://github.com/woocommerce/google-listings-and-ads/tree/release/x.x.x
```
ℹ️ This might happen when the Google API Library ghets updated as thousands of files needs to be committed and SVN gets in trouble with that.
For solving it, follow this steps:
First lets checkout the current SVN to get the latest files:
- Create a directory somewhere in your local machine. As an example lets assume it will be
/home/gla
- Run
cd /home/gla
- Run
svn checkout https://plugins.svn.wordpress.org/google-listings-and-ads --depth immediates
- Run
svn update --set-depth infinity google-listings-and-ads/trunk
Now let's unzip the extension files from the ZIP created during the release
Run this
cd google-listings-and-ads
rm -rf trunk/*
cd trunk
unzip /tmp/google-listings-and-ads/google-listings-and-ads.zip # Change this directory for where your temporary ZIP file is
cd google-listings-and-ads
mv * .. && cd ..
rmdir google-listings-and-ads
Now we need to commit folder by folder so SVN can handle the commits without trouble
Repeat this code for the next folders:
vendor/googleads vendor/google vendor/guzzlehttp vendor/psr
cd vendor/googleads
svn status | grep '^!' | awk '{print $2}' | xargs svn delete
svn status | grep '^?' | awk '{print $2}' | xargs svn add
svn ci -m 'Big update for vendor/googleads'
cd ../..
After committing these large amounts of file changes, use woorelease wporg:release
for doing the release without blocking SVN
# Both --folder and --zip_file should point to the temporary folder just used for `wr release` in your system
# --folder=/<temporary folder in your system>/google-listings-and-ads
# --zip_file=/<temporary folder in your system>/google-listings-and-ads/google-listings-and-ads.zip
woorelease wporg:release --product_version=x.x.x --folder=/<tmp_folder>/google-listings-and-ads --zip_file=/<tmp_folder>/google-listings-and-ads/google-listings-and-ads.zip https://github.com/woocommerce/google-listings-and-ads/tree/release/x.x.x
Run this command:
woorelease gh:release --folder=/<tmp_folder>/google-listings-and-ads --zip_file=/<tmp_folder>/google-listings-and-ads/google-listings-and-ads.zip --release https://github.com/woocommerce/google-listings-and-ads/tree/release/x.x.x --product_version=x.x.x