Use release infra rather than ghr to create GitHub releases #2839
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently, our CircleCI build script publishes the GitHub release using ghr, whereas AppVeyor publishes the GitHub release using a custom script. To maintain consistency between the two, I've changed the CircleCI build to publish GitHub releases in a way similar to how it's done for AppVeyor builds.
I would have loved to do the release in the
deployment
section ofcircle.yml
like we do forghr
, but unfortunately this runs too early (before the build log has been saved and artifacts have been archived) so we can't hit the CircleCI API at that point. Running it as a webhook ensures that it runs once the build has fully completed, and the release script can hit the CircleCI API to verify that it's a legitimate build.Doing release this way also removes the risk of the GitHub access token leaking, as CircleCI no longer needs to have the access token.
Test plan
I manually tested the code using a test repo and it worked fine (https://github.com/Daniel15/yarn-release-test/releases/tag/v0.20.3), I'll babysit the next release we do to ensure everything is working as expected.
Closes #2799