-
Notifications
You must be signed in to change notification settings - Fork 886
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
Add workflow to prepare release branch #5143
Add workflow to prepare release branch #5143
Conversation
.github/scripts/update-versions.sh "$v-SNAPSHOT" "$v-alpha-SNAPSHOT" "$bump-SNAPSHOT" "$bump-alpha-SNAPSHOT" | ||
|
||
- name: Create pull request | ||
uses: peter-evans/create-pull-request@v3 |
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.
If wanting to avoid a third party action, might be easy enough to use gh CLI
with: | ||
commit-message: Bump snapshot version | ||
branch: bump-snapshot-version | ||
delete-branch: true |
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.
FWIW, I was trying to see how delete-branch could possibly work when creating a pull request, and indeed it doesn't
https://github.com/peter-evans/create-pull-request#action-behaviour
It would delete the PR if it had already been merged when running this step, which would never be the case for us. So to prevent confusion, we should delete this field if sticking with the action. But I'd say the CLI command is simple and all we need, this action seems to support some intense workflows :O
* examples/extension/build.gradle | ||
* Bump the version in the download link in the root `README.md` file | ||
* Run the [Prepare Release Branch workflow](https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/workflows/prepare-release-branch.yml). | ||
* Review and merge the two PRs that it creates (one is targeted to the release branch and one is targeted to the `main` branch) |
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.
Make sure to delete the branch after merging
git add -u | ||
git commit -m "$msg" | ||
git push origin HEAD:bump-snapshot-version | ||
gh pr create --title "$msg" --body "$msg" --head bump-snapshot-version --base main |
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 just noticed the **/**
CNCF branch protection rule seems to be gone, did we accidentally delete it?
Though either way, even if we can make it work for release branch, this PR creation to main
looks like it'll be problematic due to CLA check :(
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.
Though we do explicitly have the checkbox to let us merge even if status checks aren't all passing. So that could be our workaround
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.
we have branch protection on both main
and v**
, so CLA check will be a problem for both PRs 😞
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.
it looks there are complexities to approving github-actions bot account for EasyCLA and so that path could take some time
it seems that the current recommendation is to use a Personal Access Token generated by one of the maintainers: https://github.com/open-telemetry/community/blob/main/docs/using-github-extensions.md#writing-your-github-actions-pipelines
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.
reverted back to using github-actions bot for now at least
* Add workflow to prepare release branch * Avoid third party action * Use PAT * Delete the branches * Revert "Use PAT" This reverts commit 6f0c1b1.
Automate a couple of the manual release steps
I tested this on my fork, you can look there to see example of the two PRs that this workflow creates: https://github.com/trask/opentelemetry-java-instrumentation/pulls