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

ci: automate major release tasks #960

Merged
merged 78 commits into from
Mar 7, 2025
Merged

Conversation

goosewobbler
Copy link
Member

@goosewobbler goosewobbler commented Feb 16, 2025

Closes #959.

This includes:

  • Automated update of dependabot.yml
  • Reusable workflows
  • Updated development documentation to reflect new release process
  • Automated branch lifecycle management
    • Automatic creation of branches during major releases
      • feature
      • maintenance
    • Automatic archiving (deletion) of old maintenance branches
  • Enhanced automation for major releases
    • Automatic dependabot.yml updates for new maintenance branch
    • Automatic merge of feature branch to main
  • Updated release workflows to use dynamic branch resolution
    • feature → automatically resolves to next major version branch (e.g., feature/v9)
    • main → current stable version
    • maintenance → automatically resolves to previous version branch (e.g., v7.x)
  • Enhanced backporting process
    • Dynamic version detection from package.json
    • Interactive version confirmation when auto-detection fails
    • Improved error handling and user feedback
    • Clear version information display during execution
  • Rework of labels and strategy for usage
  • Updated documentation for all of the above

@goosewobbler goosewobbler added backport:requested Should be applied to the maintained (previous) version status:wip Work in progress labels Feb 16, 2025
@goosewobbler
Copy link
Member Author

WIP as I am evaluating the different approaches for updating dependabot.yml

@mato533
Copy link
Member

mato533 commented Mar 1, 2025

@goosewobbler
My idea is using yp to rewrite yaml config as simple way. I hope you like it.

https://github.com/marketplace/actions/yq-portable-yaml-processor

Implementation image on the Github Actions is follows.

- name: Replace dependabot config
  uses: mikefarah/yq@v4.45.1
  with:
    cmd: yq -i '.updates[1].target-branch = "v8"' '.github/dependabot.yml'

@mato533
Copy link
Member

mato533 commented Mar 3, 2025

@goosewobbler
I have created the PR to this PR. I hope it could be your help.

@goosewobbler
Copy link
Member Author

goosewobbler commented Mar 4, 2025

@mato533 sorry I didn't get time to look at this recently. The yq approach for updating the dependabot config seems sound, and I like the workflow reuse. I'll close this PR and use yours as a base for this piece of work.

EDIT: actually I see your PR is an update to this one, I'll merge and use this as the base.

@goosewobbler goosewobbler reopened this Mar 4, 2025
ci: improvements of the release processing
@mato533
Copy link
Member

mato533 commented Mar 4, 2025

Good! I'm glad you like it.

@goosewobbler goosewobbler removed the status:wip Work in progress label Mar 4, 2025
@goosewobbler goosewobbler requested a review from mato533 March 4, 2025 13:34
@goosewobbler
Copy link
Member Author

goosewobbler commented Mar 4, 2025

@mato533 I updated a few things here, we're now handling the branch management as part of the release, and the backporting has some changes too. I did this quite quickly so if you could check it through.

@goosewobbler goosewobbler requested a review from mato533 March 6, 2025 13:10
@mato533
Copy link
Member

mato533 commented Mar 6, 2025

@goosewobbler
Thank you for update and merging my PR!
I am testing my repo... and looking at how TAGging can be done properly. We are close to a solution and will put it together in a PR when it is ready!

@goosewobbler
Copy link
Member Author

@mato533 I moved things around and added a split between prepare and publish. Definitely close...

@mato533
Copy link
Member

mato533 commented Mar 6, 2025

@goosewobbler
year, we are close...
turbo-version is error. I think turbo-version should be before publish....
image

Copy link
Member

@mato533 mato533 left a comment

Choose a reason for hiding this comment

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

@goosewobbler
I have created the PR #1007 as review.(It was complex to express here.)
It included the fixes of tagging operation.

@goosewobbler goosewobbler requested a review from mato533 March 6, 2025 19:01
@goosewobbler
Copy link
Member Author

goosewobbler commented Mar 6, 2025

A lot more went into this one than I thought it would take initially, but it's important to have a proper automated release process.

Copy link
Member

@mato533 mato533 left a comment

Choose a reason for hiding this comment

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

The normal system appears to be working properly!

@goosewobbler goosewobbler merged commit 8d00fd5 into main Mar 7, 2025
9 checks passed
@goosewobbler goosewobbler deleted the sm/automate-major-release branch March 7, 2025 00:15
@mato533
Copy link
Member

mato533 commented Mar 7, 2025

@goosewobbler
There are likely to be some precautions that you were not aware of.

I am aware that I need to manually merge the feature branch into the main branch before running this Workflow. (It is expected, and the logs will show this.) When doing this merge, the package.json will always be conflicted.
How to resolve this is that you must always specify the current version of the main branch. (calculations don't work properly).
(e.g. if version of package.json is follows: main=9.x.y, feature/v10= 10.x.y.next-z, we need to make sure that the result of merge is 9.x.y at the version field of package.json.)

image

@mato533 mato533 added backport:requested Should be applied to the maintained (previous) version backport:completed Applied to the maintained (previous) version and removed backport:requested Should be applied to the maintained (previous) version labels Mar 7, 2025
mato533 pushed a commit that referenced this pull request Mar 7, 2025
…release

ci: automate major release tasks
(cherry picked from commit 8d00fd5)
@goosewobbler goosewobbler added backport:requested Should be applied to the maintained (previous) version backport:completed Applied to the maintained (previous) version and removed backport:completed Applied to the maintained (previous) version backport:requested Should be applied to the maintained (previous) version labels Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ci Updates to Continuous Integration backport:completed Applied to the maintained (previous) version release:next Include in the next release within its track semver:patch Changes that don't affect the API (bug fixes) track:main For the current stable version track
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate major release tasks
2 participants