-
Notifications
You must be signed in to change notification settings - Fork 5k
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 scripts to automate GitHub releases #6653
Conversation
It would be nice to have an npm command that automates "Step 1: Creating a RC Pull Request". Should that fall within the scope of this PR? |
I don't think there's much there. We can literally create the branch on GitHub itself in a second. |
1909f74
to
6c98fd1
Compare
6c98fd1
to
c9b9a35
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.
A couple small questions.
Overall, looks awesome, definitely a few flags & commands that are new to me here.
Looks like it does stop short of automating the publication to the stores, which makes sense for now, as that's the most security sensitive bit. Since this PR excludes the most security critical piece, it seems generally safe to try out and see how we like it!
b9633fb
to
d35a759
Compare
Task remaining on this PR:
|
c21562a
to
56ddde7
Compare
I've added d096ead and 56ddde7 to do exactly those things. I think the code here is ready for review and I'm going to give it a QA pass over on my fork. I'll update here when I've confirmed that this all works as I'd like it to. |
56ddde7
to
a6a8a9c
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.
I believe release-bump-changelog-version
needs to be made executable? All the scripts but that one are showing as +x
for me
1051b8a
to
bb45a51
Compare
I'm giving this one more QA pass on my fork now, I'll leave a comment here when it's ready for review |
Cool, I'm happy with where this is. I think this is good for another review. As it stands, this successfully creates a GitHub Release with the changelog and assets attached. You can see an example of the process on my fork:
Note that the release contains all the lines in the changelog for the given version so we have the opportunity to add content both before and after the pull request is created. Note as well that there is a slight but important difference between the name of the branches we currently use and the branches we'll need to use to trigger these scripts: there is a |
bb45a51
to
fdc2a7e
Compare
I've added fdc2a7e as well to set the reviewer on the PR |
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
Could we add your description of this flow (documentation of how to use these scripts) to our I also notice the line item:
Should these tokens be the @metamaskbot keys? I imagine it would be posting the PRs. |
Yes, that'll be set once these are merged in, via the Circle CI config page.
Sure can! I'll note here though that these scripts aren't run directly and are only for CI (they've got checks in place to make sure as well) so it'll be more documenting how to trigger these scripts. |
I'm going to create a separate PR with some updates to the docs |
This PR updates our CircleCI configuration, adding new 1 new job and 1 new workflow to automate parts of our release process. The work here ultimately results in a GitHub Release with the artifacts from
npm run dist
attached.The Workflow
The high-level workflow is:
develop
I've been playing around with the configuration on my fork, if you want to look at the CI builds for that repository:
develop
build: https://circleci.com/workflow-run/83240798-7fea-4d4c-811f-e45cb2202618Step 1: Creating a RC Pull Request
End result: a pull request for the version is created
Process: when a branch is created matching
^Version-v\d+[.]\d+[.]\d+
, a CI job will use the version number from the branch name to update the version field in the manifest, and create a PR for that change. That PR can then be reviewed and updated as appropriate. When we go to merge the PR, we can squash+merge the changes into a single commit with the messageVersion vX.Y.Z
.Step 2: Creating a GitHub Release
End result: a release is created with the Chrome and Firefox builds attached
Process: when a commit to
develop
is made with a message matching^Version v\d+[.]\d+[.]\d+
. the CI build for that commit will include tagging it asvX.Y.Z
and creating a release with the Chrome and Firefox builds as assets.UnansweredQuestionsHow do we want to deal withScripts added to update the changelogCHANGELOG.md
?Who should we set as reviewers on the RC PR?@MetaMask/extension-release-team
Tasks
GITHUB_TOKEN
andGITHUB_TOKEN_USER
environment variables in CircleCIRefs