Automattic / Automattic/jetpack

Release management: automate deployment of tags to SVN

Open
#21,558 2 comments 0 reactions 0 assignees View on GitHub
[Plugin] Jetpack [Pri] Normal Actions Build Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

As we're starting to release more and more often, and more and more plugins, I believe one of the manual steps of our release process could be automated.

- Folks on other teams aren't always familiar with SVN and the intricacies of deploying a plugin update to WordPress.org.
- We already have quite a few checks in place before a release is published on GitHub in the mirror repo.
- Until our monorepo repo, there were still some big differences between the tag we created on GitHub and the code that eventually was tagged in SVN; since we started working with mirror repos and tagging releases there, the code that is tagged is really production-ready.

Deployment to SVN typically includes 5 main steps:

1. Push the changes to `trunk`
2. Create a new directory for the tag in `tags/`
3. Update the stable tag in `tags/x.x/readme.txt`
4. When and if a release has to be made available to the general public, update the stable tag in `trunk/readme.txt`
5. Clean up old beta tags from `tags/`

I think we could reasonably aim to automate parts of that process. One part we won't want to automate just yet is step 5. Update the stable tag in `trunk`, thus making a release available, should still be a manual step for now. One additional benefit of keeping this step manual is that it makes it clear who is in charge of a deployment / release, even if the initial tag deployment was done by an automated process (and thus stored credentials).

There is prior art we could use to get started with this:

- There are some actions like this one available: https://github.com/10up/action-wordpress-plugin-deploy
- We've done some work in-house for such deployments: see PCYsg-mMA-p2
- We already have a process in place to enable GitHub actions on specific mirror repos: https://github.com/Automattic/jetpack/blob/a158349d2892b33c9ec99a816f81b82d5f90d153/.github/files/build-all-projects.sh#L151-L160

I think a good first candidate for this process could be the Jetpack plugin, since we now release weekly. We could then expand this to our other standalone plugins with a matching W.org plugin.

cc @kraftbj and @anomiex, since we've talked about this in the past.

----------

References:

- p9dueE-3ca-p2

Contributor guide

Open the contributing guide

Research direction

Start with .github/files/build-all-projects.sh around lines 151–160, then review the linked WordPress plugin deployment action and the documented five SVN deployment steps. Define the automation for pushing trunk, creating tags, updating tag readmes, and cleaning beta tags, while leaving the trunk stable-tag update manual; validate the design against the Jetpack release process.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, php, wordpress
Domain
devops, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.