Skip to content
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

Refactor GitHub release workflows #542

Merged
merged 7 commits into from
Apr 9, 2024
Merged

Conversation

vcanales
Copy link
Member

@vcanales vcanales commented Apr 8, 2024

Refactor GitHub release workflows in order to comply with branch protection rules.
Also removes google fonts related workflow.

The new process

  1. Run the "Create new release PR" manually, selecting the release type ("major", "minor", or "patch"). This will create a new branch including the Changelog update and the version bumo on the readme, create-block-theme.php, and package.json files.
  2. Merging the PR created on the previous step will trigger the deploy workflow, which remains unchanged, except for the conditions added in order for it to run only if the merged PR matches the characteristics of an automated release PR.

Testing instructions

  1. Fork this repo
  2. Checkout this branch
  3. Merge intro trunk on the fork
  4. Run the workflow, a new PR should be created on the fork
  5. Merge the PR; the automated deploy step will run. At this point, the only things that you'll be able to test on the fork is whether the deploy workflow correctly identifies the PR and branch as a new release, and the tag creation. The deploy itself requires credentials only available on the parent repo.

@vcanales vcanales requested a review from a team April 8, 2024 15:59
vcanales and others added 2 commits April 8, 2024 12:25
Refactor GitHub release workflows in order to comply with branch protection
rules. The new process:

1. Run the "Create new release PR" manually, selecting the release type
   ("major", "minor", or "patch"). This will create a new branch
including the Changelog update and the version bumo on the readme,
create-block-theme.php, and package.json files.
2. Merging the PR created on the previous step will trigger the deploy
   workflow, which remains unchanged, except for the conditions added in
order for it to run only if the merged PR matches the characteristics of
automated release PR.

1. Fork this repo
2. Checkout this branch
3. Merge intro trunk on the fork
4. Run the workflow, a new PR should be created on the fork
5. Merge the PR; the automated deploy step will run. At this point, the
   only thing that you'll be able to test on the fork is that the deploy
workflow correctly identifies the PR and branch as a new release. The
deploy itself requires credentials only available on the parent repo.

* add block themers as reviewers

* prefix tag with v
@pbking
Copy link
Contributor

pbking commented Apr 9, 2024

I can confirm that the branch is created as expected, versioning is updated and changelog is created as expected.
There was an error with the PR creation, I'm unsure why or if that was expected.

image

The error noted that both title and body are required, and I see that both are provided so I'm not sure what's actually wrong.

@pbking
Copy link
Contributor

pbking commented Apr 9, 2024

I have confirmed that this workflow works as expected per the instructions.

Using a forked repository I got all the way to "Deploy to Wordpress" when merging the branch created with the workflow (which failed as noted should be expected due to no credentials on my fork... which was good since it was just a test run anyway. :) )

Copy link
Contributor

@pbking pbking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I mostly understand the code enough to approve it. :)

Tested it out and it works as described and desired.

🚢

@vcanales vcanales merged commit fd372a6 into trunk Apr 9, 2024
2 checks passed
@vcanales vcanales deleted the update-release-workflow branch April 9, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants