-
Notifications
You must be signed in to change notification settings - Fork 54
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
Automate release preparation process #1710
Conversation
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.
Missing:
- Name adjustment to new branching style.
Ideas:
- To PR's could be created, the one that will be merged into release, and the one that will be merged into main. Both should follow the newly created branch "pre-release/x.y.z"
|
||
on: | ||
issues: | ||
types: [opened] |
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 think using a workflow_dispatch
trigger might be a better option.
- No need to create an issue. Workflow can be triggered manually with a button.
- Version number can be provided as input, no need to parse it from the title.
- No unnecessary action triggers every time an issue is created.
More on this: https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-workflow-runs/manually-running-a-workflow
if: steps.extract-version.outputs.micro == 0 | ||
run: | | ||
git checkout -b release/${{ steps.extract-version.outputs.major }}.${{ steps.extract-version.outputs.minor }}.x | ||
git push origin release/${{ steps.extract-version.outputs.major }}.${{ steps.extract-version.outputs.minor }}.x |
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.
In keeping with git-flow style branches, I would call this "pre-release/x.y.z". Based on this link, "main" is would be "release" in our case, "develop" is "main", and we could name "release/x.y.z" as "pre-release/x.y.z".
echo "minor=$minor" >> $GITHUB_OUTPUT | ||
echo "micro=$micro" >> $GITHUB_OUTPUT | ||
- name: Delete Existing Version Update Branch | ||
run: git push --delete origin ${{ env.working_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.
When is this branch created, or where does it come from?
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | ||
with: | ||
base: release/${{ steps.extract-version.outputs.major }}.${{ steps.extract-version.outputs.minor }}.x | ||
branch: ${{ env.working_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.
The base branch should be "release", and the branch should be our newly created branch, right? "pre-release/x.y.z"
- name: Create Release Branch | ||
if: steps.extract-version.outputs.micro == 0 | ||
run: | | ||
git checkout -b release/${{ steps.extract-version.outputs.major }}.${{ steps.extract-version.outputs.minor }}.x |
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 would add an extra git checkout main; git pull
to make sure we are branching of the most recent version of main.
Closing as this will be addressed in #1678 |
Due Diligence
Description
Summary
This PR introduces a new GitHub Actions workflow named "Prep Heat Release". The workflow is designed to automate the process of preparing a release for the Heat project.
Motivation
The goal of this workflow is to streamline the release preparation process by automating version extraction, branch creation, and version bumping. This reduces manual effort and minimizes the risk of human error.
Workflow Details
The workflow is triggered when an issue is opened with the label
release-prep
. A dedicated issue template has been added to the repo.Impact
These changes will automate the release preparation process. It will create new release branches if needed, and update version numbers automatically based on the issue title. It will create a PR where further (manual) work can be collected.
The resulting PR looks like this.
Issue/s resolved: #1709
Changes proposed:
.github/ISSUE_TEMPLATE/release_prep.md
to guide users through the process of triggering the release preparation workflow..github/workflows/release-prep.yaml
to automate the release preparation process, including extracting version information, creating release branches, updating version numbers, and creating pull requests.RELEASE.md
to reflect the new automated release preparation process, including instructions on how to trigger the workflow, update version numbers, and publish releases. [1] [2] [3]RELEASE.md
.Type of change
Automation and docs update
Memory requirements
Performance
Does this change modify the behaviour of other functions? If so, which?
no