-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Github-Actions-Workflows][Plugin-Release] Allow shipping a point-release for an older stable release #49082
[Github-Actions-Workflows][Plugin-Release] Allow shipping a point-release for an older stable release #49082
Conversation
@@ -130,8 +145,8 @@ jobs: | |||
- name: Replace the stable tag placeholder with the existing stable tag on the SVN repository | |||
env: | |||
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V' | |||
STABLE_TAG: 'Stable tag: ${{ steps.get_previous_stable_version.outputs.stable_version }}' | |||
run: sed -i "s/${STABLE_TAG_PLACEHOLDER}/${STABLE_TAG}/g" ./trunk/readme.txt | |||
run: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before, STABLE_TAG
was based on the value of steps.get_previous_stable_version.outputs.stable_version
, which for me looked a bit confusing, given the get_previous_stable_version
step -- we actually want the current latest version, and not the previous, and we can get that from the VERSION
env variable, defined as an env
variable for the job and passed as part of the payload for the release
event.
env: | ||
STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V' | ||
run: | | ||
sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" ./branches/$VERSION/readme.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my only major concern. While I definitely follow your reasoning, I also see it being a very easy step to miss, even for someone experienced with the workflow. And yet it could have big repercussions if it actually overwrites the trunk version in WordPress.org, because that impacts anyone installing the plugin on their own sites, not just us I think at the very least, we need to avoid pushing to the SVN repo in this scenario, even if someone accidentally sets the latest release in GitHub. I imagine changing the latest release in GitHub is easier than reverting in SVN? |
Yeah, I'll see if I can come up with a condition that will avoid the publish event from triggering the upload action if the GB version being published is from an older branch. A simpler alternative might be to set it up so that the |
It seems like there's a Edit: Oh, the docs say
So maybe we cannot control it for a draft, and there's a "latest" checkbox that's preselected when people go to manually publish it? 😕 |
Looks like this needs a rebase to account for #45932 🙂 |
…more And other minor improvements
Revert changes I made in order to test end-to-end from a test fork.
321db3e
to
d685abb
Compare
Done. I made sure to preserve the commits, and updated the PR desc to point the instructions to the newly rebased first commit. |
- name: Commit the content changes | ||
working-directory: ./branches | ||
run: | | ||
svn st | grep '^?' | awk '{print $2}' | xargs -r svn add | ||
svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm | ||
svn commit -m "Committing version $VERSION" \ | ||
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" | ||
|
||
- name: Create the SVN tag | ||
working-directory: ./branches | ||
run: | | ||
svn copy "$PLUGIN_REPO_URL/branches/$VERSION" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Tagging version $VERSION" \ | ||
--no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I had mentioned in our Slack convo that the tags should be created from the corresponding branches. However, what I meant was ideally to have a x.y
branch (e.g. 15.4
), which would be created at the time that 15.4.0
is released, and from which all point releases are created. (This would be to mimic the behavior we have here in the GB git repo, and also what WP Core is doing in its svn repo.)
Among other things, this would somewhat reflect in svn that e.g. 15.4.2 is based on 15.4.1, which in turn is based on 15.4.0, etc. However, the idea is also partly based on my ignorance of how branching and tagging works in svn.
Maybe we can get away without any branching at all? 🤔 Would it be possible to commit the release files straight to /tags/
(i.e. without committing them to /branches/
)? (After all, for the actual plugin code, git is our source of truth, so we don't need to go out of our way to mimic the branches and tags in the GB git repo.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 9dc4b39
Yeah, that's exactly what I had in mind -- I think we can de-risk this workflow quite a bit by making sure the pre-selected default is fine (unchecked in this case). I've noticed that the |
Oh, good catch! You are right, it is easy to confuse the current context
though :/
…On Wed, Mar 22, 2023, 3:00 PM Bernie Reiter ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .github/workflows/upload-release-to-plugin-repo.yml
<#49082 (comment)>
:
> + # do the magic here
+ curl -L -o gutenberg.zip $PLUGIN_URL
+ unzip gutenberg.zip -d branches/$VERSION
+ rm gutenberg.zip
+
+ - name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
+ env:
+ STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
+ run: |
+ sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" ./branches/$VERSION/readme.txt
+
+ - name: Download Changelog Artifact
+ uses: ***@***.*** # v3.0.1
+ with:
+ name: changelog trunk
+ path: branches/$VERSION
Not sure this is working: I have a branches/$VERSION/changelog.txt in my
svn now. (I.e. with a folder that's literally named $VERSION.)
I think variable substitution works differently in GH workflows/YAML files
-- normal shell substitution only works in run: ('cause that's normally
executed in a shell 😅 ). Everywhere else, we need ${{ }} for expressions
<https://docs.github.com/en/actions/learn-github-actions/expressions>,
and env variables
<https://docs.github.com/en/actions/learn-github-actions/variables>
aren't directly available (but through env.xyz, if I'm not mistaken). The
following should work though:
⬇️ Suggested change
- path: branches/$VERSION
+ path: branches/${{ github.event.release.name }}
—
Reply to this email directly, view it on GitHub
<#49082 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAT2YD6L2ELNOH4KSRPBZDW5NR5FANCNFSM6AAAAAAV3CRFDE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Oh, thanks for the clarification. In that case, yes, I think we can just
create it under `tags`, as it might be enough for WoA to pick it up, too
(but I will double-check).
…On Wed, Mar 22, 2023, 2:35 PM Bernie Reiter ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .github/workflows/upload-release-to-plugin-repo.yml
<#49082 (comment)>
:
> + - name: Commit the content changes
+ working-directory: ./branches
+ run: |
+ svn st | grep '^?' | awk '{print $2}' | xargs -r svn add
+ svn st | grep '^!' | awk '{print $2}' | xargs -r svn rm
+ svn commit -m "Committing version $VERSION" \
+ --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
+
+ - name: Create the SVN tag
+ working-directory: ./branches
+ run: |
+ svn copy "$PLUGIN_REPO_URL/branches/$VERSION" "$PLUGIN_REPO_URL/tags/$VERSION" -m "Tagging version $VERSION" \
+ --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
I know I had mentioned in our Slack convo that the tags should be created
from the corresponding branches. However, what I meant was ideally to have
a x.y branch (e.g. 15.4), which would be created at the time that 15.4.0
is released, and from which all point releases are created. (This would be
to mimic the behavior we have here in the GB git repo, and also what WP
Core is doing in its svn repo.)
Among other things, this would somewhat reflect in svn that e.g. 15.4.2 is
based on 15.4.1, which in turn is based on 15.4.0, etc. However, the idea
is also partly based on my ignorance of how branching and tagging works in
svn.
Maybe we can get away without any branching at all? 🤔 Would it be
possible to commit the release files straight to /tags/ (i.e. without
committing them to /branches/)? (After all, for the actual plugin code,
git is our source of truth, so we don't need to go out of our way to mimic
the branches and tags in the GB git repo.)
—
Reply to this email directly, view it on GitHub
<#49082 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAT2YH3EKDU34X2IMQXDL3W5NO7TANCNFSM6AAAAAAV3CRFDE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sure thing :)
…On Wed, Mar 22, 2023, 1:13 PM Bernie Reiter ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .github/workflows/build-plugin-zip.yml
<#49082 (comment)>
:
> @@ -56,7 +56,7 @@ jobs:
github.event.inputs.version == 'rc' ||
github.event.inputs.version == 'stable'
) || (
- endsWith( github.ref, needs.compute-stable-branches.outputs.current_stable_branch ) &&
+ github.ref != 'refs/heads/trunk' &&
Ideally, we should also prevent running the action from arbitrary branches
🤔
Maybe we can limit to release/ branches?
⬇️ Suggested change
- github.ref != 'refs/heads/trunk' &&
+ startsWith( github.ref, 'refs/heads/release/' ) &&
—
Reply to this email directly, view it on GitHub
<#49082 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAT2YHBSR72J3G5FGQMPADW5NFM5ANCNFSM6AAAAAAV3CRFDE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Thanks!
…On Wed, Mar 22, 2023, 8:08 AM Bernie Reiter ***@***.***> wrote:
Looks like this needs a rebase to account for #45932
<#45932> 🙂
Done. I made sure to preserve the commits, and updated the PR desc to
point the instructions to the newly rebased first commit.
—
Reply to this email directly, view it on GitHub
<#49082 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAT2YAII7Y2KHI6L3BN2OTW5MBXTANCNFSM6AAAAAAV3CRFDE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Awesome, thanks for looking into it and pointing it out!
…On Mon, Mar 20, 2023, 2:51 PM Bernie Reiter ***@***.***> wrote:
A simpler alternative might be to set it up so that the Set as the latest
release is not checked by default for those releases, but I'm not sure if
that's possible.
It seems like there's a make_latest field in GH's REST API to control
this (see
<https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release>
).
—
Reply to this email directly, view it on GitHub
<#49082 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAT2YCXBEOJ63ESCR2KEL3W5C7M3ANCNFSM6AAAAAAV3CRFDE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Apologies for the oversight
…On Wed, Mar 22, 2023, 3:06 PM Marcelo Serpa ***@***.***> wrote:
Oh, good catch! You are right, it is easy to confuse the current context
though :/
On Wed, Mar 22, 2023, 3:00 PM Bernie Reiter ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In .github/workflows/upload-release-to-plugin-repo.yml
> <#49082 (comment)>
> :
>
> > + # do the magic here
> + curl -L -o gutenberg.zip $PLUGIN_URL
> + unzip gutenberg.zip -d branches/$VERSION
> + rm gutenberg.zip
> +
> + - name: Replace the stable tag placeholder with the existing stable tag on the SVN repository
> + env:
> + STABLE_TAG_PLACEHOLDER: 'Stable tag: V\.V\.V'
> + run: |
> + sed -i "s/$STABLE_TAG_PLACEHOLDER/Stable tag: $VERSION/g" ./branches/$VERSION/readme.txt
> +
> + - name: Download Changelog Artifact
> + uses: ***@***.*** # v3.0.1
> + with:
> + name: changelog trunk
> + path: branches/$VERSION
>
> Not sure this is working: I have a branches/$VERSION/changelog.txt in my
> svn now. (I.e. with a folder that's literally named $VERSION.)
>
> I think variable substitution works differently in GH workflows/YAML
> files -- normal shell substitution only works in run: ('cause that's
> normally executed in a shell 😅 ). Everywhere else, we need ${{ }} for
> expressions
> <https://docs.github.com/en/actions/learn-github-actions/expressions>,
> and env variables
> <https://docs.github.com/en/actions/learn-github-actions/variables>
> aren't directly available (but through env.xyz, if I'm not mistaken).
> The following should work though:
> ⬇️ Suggested change
>
> - path: branches/$VERSION
> + path: branches/${{ github.event.release.name }}
>
> —
> Reply to this email directly, view it on GitHub
> <#49082 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAT2YD6L2ELNOH4KSRPBZDW5NR5FANCNFSM6AAAAAAV3CRFDE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Co-authored-by: Bernie Reiter <ockham@raz.or.at>
Co-authored-by: Bernie Reiter <ockham@raz.or.at>
… issues while testing
… timeout issues while testing" This reverts commit da46aba.
This commit significantly optimizes the process of adding a new tag to the SVN repository in our GitHub Workflow. Previously, our process involved checking out the entire tags directory from the SVN repository, which led to increased execution time and failure points when the tags directory was filled with numerous versions. We've resolved this issue by leveraging the svn import command, which allows us to directly add a new directory to the tags directory without checking out the existing directories first. This results in faster and more reliable workflow execution, particularly when dealing with repositories that have accumulated many tagged versions. The changes made include: Removing the step to checkout Gutenberg tags from the WP.org plugin repository. Adding a new step that uses the svn import command to directly add a new version directory to the SVN repository. This is achieved without the need to checkout all existing directories under tags/. Removing the step to checkout the new Gutenberg tag as it's not needed anymore.
This commit enhances the conditional checks within the 'upload' and 'upload-tag' jobs in our GitHub Actions workflows. Previously, the jobs were executed based solely on the 'prerelease' flag of the release. However, there could be situations where this flag is accidentally set to 'false' for a Release Candidate (RC). To avoid such mishaps, the conditions have been extended to check for the '-rc' suffix in the version string as well. This ensures that even if the 'prerelease' flag is incorrectly marked as 'false', the 'upload' and 'upload-tag' jobs are still skipped for RCs, thus preventing any unintended release of RC builds.
…builds" This reverts commit eae536a.
This makes sure we don't upload RCs as trunk or tag even if the deployer accidentally unchecks the "Set as prerelease" flag.
aebc503
to
472262e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Based on all the testing we've done, plus the safeguards you've added, LGTM 🤞😮💨🚢
# Determines if the first version string is greater than the second version string. | ||
# | ||
# Params: | ||
# $1 - The first version string to compare, which may have an optional leading "v". | ||
# $2 - The second version string to compare, which may have an optional leading "v". | ||
# | ||
# Return values: | ||
# 0 - The first version string is greater than the second version string. | ||
# 1 - The first version string is less than or equal to the second version string. | ||
is_first_version_greater_than_second() { | ||
v1=${1#v} | ||
v2=${2#v} | ||
dpkg --compare-versions "$v1" gt "$v2" | ||
return $? | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely not for this PR, but in a follow-up, can we maybe replace this with the semver
npm? I'm already using it in a few places in the build-plugin workflow (e.g.) to compute version numbers, and it also supports comparison
semver.gt('1.2.3', '9.8.7') // false
semver.lt('1.2.3', '9.8.7') // true
(and cleanup: semver.clean(' =v1.2.3 ') // '1.2.3'
).
(dpkg
is a Debian/Ubuntu tool IIRC, and I've tried to avoid bash-isms and other dependencies as much as possible in order to make local testing of individual steps from workflows at least a bit easier across platforms -- including MacOS.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I'll take note of that for a follow-up 👍🏻
Let's just make sure to announce this properly, e.g. in
Am I missing anything important? 🤔 Maybe one of us should volunteer to run the first GB release after landing this 🤔 |
The next Gutenberg release (16.1) will be the last before 6.3 Beta 1, and as editor tech leads, either @ramonjd or myself will likely be running it. If this isn't an urgent change, it might be safer to aim for 16.2 so that there's no risk of disruption to 6.3 Beta. |
Sounds good, thank you @tellthemachines. So if I'm not mistaken:
@fullofcaffeine How about we merge this on July 5th and also take care of publishing 16.2 RC1 right afterwards? |
Sounds like a good plan! 👍🏻 |
Removed in WordPress@014e2c6. I accidentally removed it instead of commenting out, so I forgot to reactivate it. The problem was that due to the amount of changes later, I couldn't just revert this commit.
…ease for an older stable release (#49082) * Allow point-releases for release branches that are not the latest anymore And other minor improvements * Revert debug changes Revert changes I made in order to test end-to-end from a test fork. * Limit runs to `release/` branches Co-authored-by: Bernie Reiter <ockham@raz.or.at> * Fix changelog directory interpolation Co-authored-by: Bernie Reiter <ockham@raz.or.at> * Re-add debug changes for further testing * Create only the tag when releasing an older point release, do not create a branch anymore * Implement guard against accidental trunk release of older point releases This refactors the upload zip workflow and add some version arithmetic to make sure the right version is uploaded depending: - what is the current version set as latest -- this signals that a trunk release could be imminent, but is not enough to define it - what is the current version in the WP core repo (real latest released version) -- this is compared with the published version and if it's greater than this version + the version was set as latest in GH, then it is a trunk release - If the conditions above are false, then it's a tag release. See the source for more details. * Attempt to fix "fetch" already defined error when running the script in the GH actions env * Simplify by not using node-fetch, or it will require installing the npm * GH requires an user-agent * Improve var name and comments * Define func to set the output of the "compute-should-update-trunk" job and improve its name * The core object should already be available as part of the github-scripts package * Rely only in the github ref from the published release and not the latest tag, restructure the workflow to make it easier to debug and simplify it by using shell commands/script instead of JS * Simplify further by moving the fetch core repo job to a step inside compute_should_update_trunk * Fix/improve step/job ids * Fix typo * Formatting fixes Auto-format with the RedHat YAML extension in vscode. * Add missing outputs and a couple of other fixes * A couple more fixes and a simplification of the compute_latest_version step * Mock the build of the gutenberg.zip for debugging purposes, this commit should be reverted before merging! * Fix a couple of step names * Re-add prelease attribute, was accidentally commented out * Debug commit, please revert: mock the version number in the version repo * Fix changelog fetching when uploading the SVN tag * Mock SVN version to 16.1.0 * Make the svn commit command verbose in order to debug network timeout issues while testing * Revert "Make the svn commit command verbose in order to debug network timeout issues while testing" This reverts commit da46aba. * Optimize SVN tag addition in GitHub workflow This commit significantly optimizes the process of adding a new tag to the SVN repository in our GitHub Workflow. Previously, our process involved checking out the entire tags directory from the SVN repository, which led to increased execution time and failure points when the tags directory was filled with numerous versions. We've resolved this issue by leveraging the svn import command, which allows us to directly add a new directory to the tags directory without checking out the existing directories first. This results in faster and more reliable workflow execution, particularly when dealing with repositories that have accumulated many tagged versions. The changes made include: Removing the step to checkout Gutenberg tags from the WP.org plugin repository. Adding a new step that uses the svn import command to directly add a new version directory to the SVN repository. This is achieved without the need to checkout all existing directories under tags/. Removing the step to checkout the new Gutenberg tag as it's not needed anymore. * Enhance safety checks in workflow to skip upload jobs for RC builds This commit enhances the conditional checks within the 'upload' and 'upload-tag' jobs in our GitHub Actions workflows. Previously, the jobs were executed based solely on the 'prerelease' flag of the release. However, there could be situations where this flag is accidentally set to 'false' for a Release Candidate (RC). To avoid such mishaps, the conditions have been extended to check for the '-rc' suffix in the version string as well. This ensures that even if the 'prerelease' flag is incorrectly marked as 'false', the 'upload' and 'upload-tag' jobs are still skipped for RCs, thus preventing any unintended release of RC builds. * Revert "Enhance safety checks in workflow to skip upload jobs for RC builds" This reverts commit eae536a. * Skip upload jobs if release is an RC by checking the ref for a rc suffix This makes sure we don't upload RCs as trunk or tag even if the deployer accidentally unchecks the "Set as prerelease" flag. * Revert build plugin mocking logic Effectively reverts changes in 014e2c6. * Revert initial dev/debug changes Reverts changes from 489aa70. If further testing is needed, revert the changes here again. * Revert WP SVN repo version mock Revert changes from fe8b33c. * Add back if conditions that were accidentally removed Removed in 014e2c6. I accidentally removed it instead of commenting out, so I forgot to reactivate it. The problem was that due to the amount of changes later, I couldn't just revert this commit. --------- Co-authored-by: Bernie Reiter <ockham@raz.or.at>
What?
Allows the creation + release (as a
tag
in the WP SVN repo) of a point release for a given stable release, even when a newer (leaf/latest
) stable release is present. The release should not be marked aslatest
when publishing and it will then run through a fork of the upload step that will ship it as a branch (under thebranches
directory) in the WP plugin repo (+ tag it undertags
).Why?
Currently, if (a) bug(s) is(are) found in a given version of Gutenberg and a fix is worked on, we can then ship this fix(es) as a patch release for that version. However, sometimes during the window of time the bug was reported/fix implemented, it could happen that the next stable release is shipped and that the next stable release isn't suitable to be released due to other newly-introduced issues. This effectively prevents a point release from being released for the previous stable release (which is not the
latest
anymore at this point). In the best case, the user must wait for the next version, which might take longer due to new issues that need to be worked out. This can be a dangerous proposition as a new version might bring more issues and needs further testing, especially in big multisite WordPress instances like Wordpress.com, effectively creating a significant bottleneck for shipping the fix(es). Because of that, we should be able to ship patch releases for older stable releases, even if a new stable release is already out, to have a faster turnaround when shipping bug-fixes. That's the goal of this changeset.How?
build-plugin-zip.yml
(#)upload-release-to-plugin-repo.yml
(#) that uploads that patch release as a branch (and tags it) to the WP plugins repo SVN. In this case, it leaves outtrunk
untouched in the SVN repo. This step only runs if thelatest
stable (fetched using the GH API) differs from the published version; otherwise, theupload as trunk
runs instead. For this to work well, the GitHub draft release for this patch-release should NOT be marked as thelatest
release when it's published, or it will be considered the last release by the workflow and will replacetrunk
!*[0]*[0] I don't see this as a huge problem, as long as we document this well. Also, this will often be done by people that understand the workflow and only in cases when an older patch release is needed when a new stable version is out, which shouldn't be too common (but still critical to ship when it happens!). Finally, if it happens that a patch-release for an older stable version ends in
trunk
because someone forgot to uncheckSet as the latest release
when publishing, we can always revert the changes in the SVN repo manually.Testing Instructions
Testing this isn't very pleasant, but possible. You'll need
ngrok
(or equivalent tunnel tool) and a local web-dav-enabled svn server exposed via the tunnel. I've used this one: https://hub.docker.com/r/elleflorio/svn-server.releases
page, don't be surprised.latest
.trunk
and the the latest release branch (i.erelease/15.4
), and change thePLUGIN_REPO_URL
to your tunnel URL.Scenarios (happy paths)
Stable point release for the
latest
releaseActions->Build Gutenberg Plugin Zip
, leavetrunk
as the branch, and in therc or stable?
input box, typestable
./releases
page, you should see a draft for the new patch release; click the pencil icon to edit it and thenPublish
. You should leaveSet as the latest release
checked here.Update Changelog and upload Gutenberg plugin to WordPress.org plugin repo
(you will need to clickShow more workflows
in the sidebar to see it)./releases
aslatest
and also in your SVN repo undertrunk
and undertags/$VERSION
where$VERSION
is the bumped version for this patch release.Create a RC in order to create a new stable release
Let's create an RC to create a new stable release later:
Actions->Build Gutenberg Plugin Zip
, leavetrunk
as the branch, and in therc or stable?
input box, typerc
./releases
page, you should see a draft for the new patch release, click the pencil icon to edit it and thenPublish
. You should leaveSet as prerelease
checked.Now we have a new release branch and are ready to create a new stable release!
Create and publish a new stable release
This will set the ground for the last test, which will be to ship a point release for your previous stable release.
Actions->Build Gutenberg Plugin Zip
, leavetrunk
as the branch, and in therc or stable?
input box, typestable
./releases
page; you should see a draft for the new patch release; click the pencil icon to edit it and thenPublish
. You should leaveSet as the latest release
checked here.Update Changelog and upload Gutenberg plugin to WordPress.org plugin repo
(you must clickShow more workflows
in the sidebar to see it)./releases
aslatest
and also in your SVN repo undertrunk
and undertags/$VERSION
where$VERSION
is the new stable release.Create and publish a patch release for the previous stable release
This is the scenario that has been implemented in this changeset. Let's go ahead and test it out.
Actions->Build Gutenberg Plugin Zip
, select your previous stable release branch (i.erelease/15.4
if the new one isrelease/15.5
) as the branch, and in therc or stable?
input box, typestable
./releases
page; you should see a draft for the new patch release; click the pencil icon to edit it and thenPublish
. IMPORTANT: You msut UNCHECKSet as the latest release
checkbox, or it will be considered a regularlatest
release and will be pushed to thetrunk
of the WP SVN repo!Update Changelog and upload Gutenberg plugin to WordPress.org plugin repo
(you will need to clickShow more workflows
in the sidebar to see it)./releases
. It won't be set aslatest
. It will also your SVN repo underbranches/$VERSION
andtags/$VERSION
where$VERSION
is the new stable release.Illustrative Screenshots
Update Changelog and upload Gutenberg plugin to WordPress.org plugin repo
workflow forlatest
stable (point or not) releases.Update Changelog and upload Gutenberg plugin to WordPress.org plugin repo
workflow fornon-latest
stable point-releases.latest
" stable point-releases are created as a branch in the SVN repo. It's also copied over totags
, too.TODO
Set as the latest release
checkbox unchecked by default for the previous-release (non-latest) patch releases? Please look at step 2) of the last test scenario for further context.