-
Notifications
You must be signed in to change notification settings - Fork 22
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
[#525] 1/2 - Create a new workflow to automate the release pull request creation #557
Conversation
758a2fe
to
78d43e4
Compare
Kover report for template-compose:🧛 Template - Compose Unit Tests Code Coverage:
|
File | Coverage |
---|
Modified Files Not Found In Coverage Report:
changelog-release.json
create_release_pr.yml
Codebase cunningly covered by count Shroud 🧛
Generated by 🚫 Danger
78d43e4
to
1e16f8e
Compare
72acad8
to
c2c8dc9
Compare
c2c8dc9
to
031475a
Compare
031475a
to
3fb0c4a
Compare
3fb0c4a
to
cdbde1a
Compare
contents: write | ||
pull-requests: write | ||
steps: | ||
- name: Checkout the latest code |
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.
- name: Checkout the latest code | |
- name: Check out the latest code |
pull-requests: write | ||
steps: | ||
- name: Checkout the latest code | ||
uses: actions/checkout@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.
I think we can use actions/checkout@v4
🙏🏼
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.
🚀
#525
What happened 👀
Create a new workflow
create_release_pr.yml
to automate the Release pull request creation:tag
on the main branch to the latest HEAD on thedevelop
.Insight 📝
To generate the release change log like our Release PR, use https://github.com/mikepenz/release-changelog-builder-action. It helps us generate the change log from a config file, like what we did with https://github.com/release-drafter/release-drafter from [#100] Add new workflow to generate release note and version tag automatically #245. However, https://github.com/mikepenz/release-changelog-builder-action does not require adding its app to our GitHub organization and can be reused to generate the change log texts for App Distribution release notes or even create releases like release-drafter.
To create the pull request by checking out a new release branch from develop, we can NOT use https://github.com/peter-evans/create-pull-request because it requires stage changes to create PR. Instead, I realized we can create PR using GitHub CLI 🤩
Before creating the release PR, we must check out a new release branch from the current
develop
.To fetch corresponding
milestone
info (assuming the milestone matches the current version name), while GitHub CLI does not support milestone API officially, we can use an extension called https://github.com/valeriobelli/gh-milestone 🤩This command helps us to get the milestone URL from the milestone name = current version:
Proof Of Work 📹
A sample generated Release PR for the current
develop
👉main
#560 🎉Run log: https://github.com/nimblehq/android-templates/actions/runs/6971579676/job/18971937503