wordpress.org release (SPP-91)#228
Conversation
With the --delete-excluded flag, it would be removed from SVN if it doesn't exist in Git
Biont
left a comment
There was a problem hiding this comment.
The two-job structure with an environment gate is a genuinely good solution to the staged release problem, and the version cross-validation across PLUGIN_VERSION, the plugin file, and readme.txt is a solid safety net. The overall approach is sound and most of the earlier review feedback has been addressed well.
One concern worth discussing before this lands: environment: wordpress-org-release introduces a dependency on a project-side GitHub environment, and this is a concept with no precedent in this repository's existing workflows.
On first run, every calling repository will have that environment auto-created regardless of whether they intend to use an approval gate, which quietly pollutes project settings and nudges teams toward a naming convention that has never been established or discussed. Making the environment name an optional input — defaulting to 'wordpress-org-release' — would remove the naming coupling and let projects use their own conventions.
But even that is a band-aid on a broader question: should this workflow reach into project-level deployment configuration at all before we've had a cross-team conversation about how environments should be used across repositories?
A second gap is the trunk-only flow. The current design only supports a full release: sync trunk, then create a tag. DRY_RUN: true produces an artifact rather than a real SVN commit, so there is no way in live mode to push to SVN trunk and stop cleanly without a tag following.
The only current escape is cancelling a pending approval, which leaves trunk committed and the run in a failed state. I raised trunk-only as a meaningful use case on April 22nd — it enables testing the published artifact before tagging — and a TRUNK_ONLY input (or my earlier OPERATION: choice that cleanly unifies new-release, trunk-only, and amend-tag) would close this without much added complexity.
I would also like to stress that the current design includes a failure mode that we must address. It falls out of the decision to leverage deployment environments - combined with Github's default behaviour:
- Developers set up the workflow not reading docs carefully, not expecting any harm to be done
- Thus, they do not setup and configure
'wordpress-org-release'on the project - Github therefore auto-creates the environment on first run
- Workflow sync trunk and proceeds to the tag creation step
- The newly created env now contains no checks & approvals whatsoever
- Because of that, it will auto-approve and create a new release without approval
Again: I support the idea of environments in principle. But I would really like to see a harmless test-run in an isolated project before we make this a quasi-standard via our shared reusable workflows.
Finally, the amend-tag case remains unimplemented: the "Verify version doesn't exist in SVN" check hard-exits with no bypass.
Before merging it would be worth an explicit decision: is this workflow intentionally scoped to new releases only? If so, that should be documented clearly so teams know in advance what to do when they need one of the other flows.
This reverts commit 7372049.
…ease' into feature/SPP-91-wordpress-org-release
…ease' into feature/SPP-91-wordpress-org-release
|
@Biont As we agreed in the call, I replaced the environment usage with the I also added documentation with three example calling actions: minimal, invoked on tag creation, and using environments for manual approval. |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
There is no reusable workflow for wordpress.org release
Addresses SPP-91.
What is the new behavior (if this is a feature change)?
Implemented a reusable workflow for publishing a plugin.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No.
Features
auth.json,.npmrc,.env).distignorefile for custom exclusions beyond the default filter listOut of scope
Note: proper documentation is missing so far. I'm going to add it as soon as the general concept is approved.
Example calling action