Skip to content

Add release workflow #168

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

Merged
merged 20 commits into from
Jun 26, 2025
Merged

Conversation

isaacbrodsky
Copy link
Collaborator

No description provided.

@coveralls
Copy link

coveralls commented May 29, 2025

Pull Request Test Coverage Report for Build #518

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.437%

Totals Coverage Status
Change from base Build #513: 0.0%
Covered Lines: 523
Relevant Lines: 546

💛 - Coveralls

@isaacbrodsky isaacbrodsky marked this pull request as ready for review May 29, 2025 20:28
@isaacbrodsky isaacbrodsky changed the title begin release workflow Add release workflow May 29, 2025
@isaacbrodsky
Copy link
Collaborator Author

Fixes #160

Adds the release workflow for automated releases using tags like v4.2.0

For simplicity, I copied the build parts into the release.yml workflow even though they are recomputing some artifacts from the tests.yml workflow. Alternately, I would need to add the release job to tests.yml and set up the dependencies there.

cc @nrabinowitz

# - master

jobs:
# tests and tests-no-docker are from tests.yml and build the actual native libraries that will be used in the release.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does that mean that these two also need to have the exact same name or it won't line up correctly? Because having a job called tests in the release yaml file feels kinda weird.

Copy link
Collaborator Author

@isaacbrodsky isaacbrodsky May 29, 2025

Choose a reason for hiding this comment

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

I could rename them to be clearer that they are just here for building the artifacts, but keeping the same names makes it easier to copy changes back and forth.

edit: I have updated the names to be clearer what they are actually doing

Comment on lines 14 to 17
# For testing:
# pull_request:
# branches:
# - master
Copy link
Collaborator

Choose a reason for hiding this comment

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

Delete?

Suggested change
# For testing:
# pull_request:
# branches:
# - master

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I find this helpful to have on hand for testing the workflow in a PR, but probably don't want to leave it in after initial tests.

matrix:
os: [ubuntu-latest]
java-distribution: [adopt]
java-version: [8]
Copy link
Member

Choose a reason for hiding this comment

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

8 is EOL, right? Should we move this higher?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've seen different things about Java 8. It seems Oracle has very long term support for it, but it does seem practically EOL. I'm not sure how much the open source ecosystem is still supporting it as I haven't done as much Java work recently.

My plan was to leave the baseline at Java 8 for now (since that is what we previously built) and then in a follow up PR re-enable some code quality tools and bump the baseline to a newer LTS release.

with:
tag_name: "v${{ env.RELEASE_VERSION }}"
release_name: "${{ env.RELEASE_VERSION }}"
body_path: CHANGELOG.md # assumes changelog contains latest release notes at top
Copy link
Member

Choose a reason for hiding this comment

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

Will this include the entire changelog per release? Or just the latest release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Based on the repo https://github.com/softprops/action-gh-release I think it is set up to take the first markdown section, the generated release should be very easy to manually modify after the fact if the detected changelog is not right.

@tyvsmith
Copy link
Member

Has this had an end-to-end test on a dummy repo? Any open questions on functional correctness? If so, is the plan to fix foward upon an issue? Would be great to have the verification documented in PR description.

@isaacbrodsky
Copy link
Collaborator Author

Has this had an end-to-end test on a dummy repo? Any open questions on functional correctness? If so, is the plan to fix foward upon an issue? Would be great to have the verification documented in PR description.

No, I have not had an opportunity to test this on a dummy repo. My plan was to fix forward as this repo has a relatively unique and complicated build process.

If desired I could set up a new artifact on Maven Central and demonstrate this script is capable of pushing that first?

@isaacbrodsky
Copy link
Collaborator Author

isaacbrodsky commented Jun 25, 2025

I was able to get "published" status using my own namespace publishing in Sonatype Central Repository. (It doesn't show up on Maven Central Search, I think this is either a delay in showing up there or because I used staging URLs, in the second case that part was unique to my repo and in this PR I used the provided URLs. Since it is not my account I cannot validate that part of the process :) )

Screenshot 2025-06-25 at 9 38 53 PM

The only outstanding issue is that the release notes generated get the entire contents of CHANGELOG, this is easy to manually fix after release. I will try to fix that but I don't think that is blocking.

@isaacbrodsky
Copy link
Collaborator Author

It appears my copy published correctly: https://repo1.maven.org/maven2/io/github/isaacbrodsky/h3/

@isaacbrodsky
Copy link
Collaborator Author

I'll update the changelog date for 4.3.0, merge, and try releasing in the next few days.

@@ -2,6 +2,10 @@

The H3-Java library is published to Maven Central via OSSRH.

Before releasing, make sure the version of the project is in the form `1.2.3-SNAPSHOT` where `1.2.3` is the version you wish to release. The release is triggered via GitHub Actions, when a tag of the form `v1.2.3` is pushed. (Workflow dispatch can be used but is not tested.)

Choose a reason for hiding this comment

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

Should this be:

when a tag of the form `1.2.3-SNAPSHOT` is pushed

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, the tag should be the release version with v prefixed. Cf. successful run here: https://github.com/isaacbrodsky/h3-java/actions/runs/15884738203

@isaacbrodsky isaacbrodsky merged commit c563830 into uber:master Jun 26, 2025
82 checks passed
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.

5 participants