Skip to content
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 release automation on tag push #876

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

sondavidb
Copy link
Contributor

@sondavidb sondavidb commented Oct 18, 2023

Issue #, if available:
#447

Description of changes:
Created a new workflow for automating part of the release process. On tag push, it will test the build on AMD64, create the binaries + sha256 checksums, and create a draft release with a changelog. Note that testing and building are run in parallel, which was an intentional design choice, but if we feel that the tests should pass before building the binaries, that can be changed.

ARM64 releases must still be created manually. Technically we could build the binaries with ARM64 here anyway but it would be considered poor practice to test and build in separate environments. (Still waiting for GH Actions to natively support ARM64 :v)

Testing performed:
I pushed a tag and ensured the workflow passed. You can see it running successfully here. The workflow was modified to include a THIRD_PARTY_LICENSES file, but otherwise is identical to the one in this PR. The workflow was triggered with the following:

git tag -s -a v999.999.999 -m "Release v999.999.999"
git push origin v999.999.999

The created release can be seen here (release will be deleted after PR is merged). Note that the changelog is empty. My guess is that this is due to previous testing with other tags making GitHub erroneously believe the last release was the tag previously pushed and deleted. This should not be an issue for official releases, but if a release needs to be modified for whatever reason, please bear in mind it may generate an empty changelog, so we should ensure we keep the original generated changelog.

To be explicit, this is not an official v999.999.999 release :P

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sondavidb sondavidb requested a review from a team as a code owner October 18, 2023 21:24
@sondavidb sondavidb force-pushed the automate-releases branch 10 times, most recently from c8bb322 to 4a8cdee Compare October 18, 2023 22:35
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the test release did not have the release version in the artifacts. Has that been resolved?

.github/workflows/releases.yml Outdated Show resolved Hide resolved
.github/workflows/releases.yml Outdated Show resolved Hide resolved
.github/workflows/releases.yml Outdated Show resolved Hide resolved
.github/workflows/releases.yml Outdated Show resolved Hide resolved
@sondavidb sondavidb force-pushed the automate-releases branch 5 times, most recently from 7ae04c0 to edb0367 Compare October 23, 2023 17:47
@sondavidb
Copy link
Contributor Author

sondavidb commented Oct 23, 2023

I noticed the test release did not have the release version in the artifacts. Has that been resolved?

Thanks for the catch. Looks like you can't refer to GH environment variables within the same step that they're assigned. Fixed that up by just using a local variable.

@sondavidb sondavidb force-pushed the automate-releases branch 2 times, most recently from 409de06 to a719b65 Compare October 25, 2023 19:03
austinvazquez
austinvazquez previously approved these changes Oct 26, 2023
Copy link
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@sondavidb sondavidb force-pushed the automate-releases branch 7 times, most recently from 115d87a to 91b925f Compare October 26, 2023 16:52
@sondavidb
Copy link
Contributor Author

Moved all binary compiling logic to a separate script and created a Makefile target for release, per previous discussions. This should allow for a slightly smoother process for automating releases on ARM64, which currently has to manually test and set up everything.

scripts/create-releases.sh Outdated Show resolved Hide resolved
Kern--
Kern-- previously approved these changes Nov 1, 2023
austinvazquez
austinvazquez previously approved these changes Nov 1, 2023
@sondavidb sondavidb dismissed stale reviews from austinvazquez and Kern-- via a86d1de November 1, 2023 16:40
@sondavidb sondavidb closed this Nov 1, 2023
@sondavidb
Copy link
Contributor Author

Poorly-handled merge conflicts, sorry about that x.x

@sondavidb sondavidb reopened this Nov 1, 2023
Signed-off-by: David Son <davbson@amazon.com>
@sondavidb sondavidb merged commit a8db74e into awslabs:main Nov 1, 2023
4 checks passed
@sondavidb sondavidb deleted the automate-releases branch November 1, 2023 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants