-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add GitHub Actions based release automation #1400
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
Conversation
.github/workflows/release.yml
Outdated
|
||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
# TODO: Adding the mongodb-dbx-release-automation app to the repository will allow fetching a one-time token and pushing |
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.
This seems like a necessary thing to enable in the initial version, as we do have branch protection rules enabled.
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.
Correct. In that case, you should follow these instructions (internal link) to request the mongodb-dbx-release-bot
application to be added to all relevant repositories.
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.
Requested
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.
🍿 Is this the last blocker?
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 is - just waiting for our IT to enable the app here, then we're good to go :)
Is there anything the blocks taking this out of Draft? |
093940e
to
b87eaa1
Compare
Not really. I've rebased on top of master and added the release environment, which allows us to better protect the necessary credentials and also allows for adding additional checks (such as directly restricting which branches can be released). |
40f11da
to
638c1d8
Compare
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.
LGTM. Thank you!
This PR adds a GitHub Actions Workflow to create releases. The process is as follows:
** Release
<major>.<minor>.0
must be released from the maintenance branch (i.e.<major>.<minor>.x
) or themaster
branch. If themaster
branch is selected, the automation will attempt to create a new maintenance branch** Release
<major>.<minor>.<patch>
must be released from the maintenance branch (i.e.<major>.<minor>.x
) - releasing from any other branches is not allowed<major>.<minor>.<patch>
inbuild.gradle
, commits this change and creates a tagbuild.gradle
is updated to<major>.<minor>.<patch+1>-SNAPSHOT
and again committedI've tested the flow in my fork where I've confirmed it works. However, a couple of changes may be appropriate still:
mongodb-dbx-release-bot
app to the repository and generate a token for the app. We can then allow the app to bypass branch protectionsAny additional build tasks (e.g. creating a package to upload to a package manager) can be done in a separate workflow that runs when a tag is pushed.
JAVA-5479