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

Create Latest Release for Every Merged Pull Request #543

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dnestoro
Copy link
Member

@dnestoro dnestoro commented Oct 7, 2024

What does this PR do?

This PR enables automatic latest releases. Whenever a new metadata is merged, we will update current latest tag (delete previous and create a new one) to contain that metadata.

To make this work, we must create initial latest tag with the corresponding release. Otherwise attempt to delete previous release will fail.

@dnestoro dnestoro requested a review from a team as a code owner October 7, 2024 11:03
@@ -30,7 +30,7 @@ jobs:
- name: "🕸️ Get changed metadata matrix"
id: set-matrix
run: |
LATEST_TAG=$(git tag --list | sort -V | tail -1)
LATEST_TAG=$(git tag --list | grep -v latest | sort -V | tail -1)
Copy link
Member Author

Choose a reason for hiding this comment

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

This additional step skips latest tag as potential base for next standard release tag name (as we always bump patch version in the version string, we want to do so from the latest standard release).

Copy link
Member

Choose a reason for hiding this comment

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

Maybe write that comment in the file?

@fniephaus
Copy link
Member

Why is this needed? Are you sure latest is even an accepted value for the version string? If we need more frequent releases, I'd vote for increasing the number of builds per month, for example to once every week.

@dnestoro
Copy link
Member Author

dnestoro commented Oct 8, 2024

Why is this needed? Are you sure latest is even an accepted value for the version string? If we need more frequent releases, I'd vote for increasing the number of builds per month, for example to once every week.

This kind of release can give users multiple benefits. For example:

  • Users don't need to wait two weeks to be able to use their metadata
  • Also users may want always new metadata in their projects in the development
  • Besides that if we make releases too frequent (weekly or even more frequent) we may unnecessarily spend github resources for storing many releases with just 1-2 libraries difference

For the latest as a version string I am not sure. I tried it on a testing repo and Github accepts it. We can discuss a different name for this kind of releases. Maybe we can use something with SNAPSHOT annotation (or even only SNAPSHOT)?

@fniephaus
Copy link
Member

If someone wants to you the latest metadata, wouldn't it be better if the consumer, the thing that downloads the metadata, uses this link rather than a latest tag that we need to manage manually: https://github.com/oracle/graalvm-reachability-metadata/archive/refs/heads/master.zip

@melix
Copy link
Member

melix commented Oct 24, 2024

So I think having a head/master/snapshot release is indeed useful. For example a user can download the archive and add it to their sources, then configure the plugin to use that zip.

The question that Fabio raises is whether we actually need to do that, given that there's already something similar provided out of the box by GitHub. The difference is that the content of the zip file is different: a metadata release contains directly, at the root of the zip file, the content of the metadata directory only (the rest of the repository is irrelevant for users). The zip provided by GitHub contains a top level directory named graalvm-reachability-metadata-master then the whole repository. Therefore it cannot be exploited directly by the user (or the plugins).

@dnestoro dnestoro self-assigned this Oct 30, 2024
@vjovanov
Copy link
Member

vjovanov commented Oct 31, 2024

I would call it graalvm-reachability-metadata-SNAPSHOT.zip, as this is what is the maven community uses. Since we are providing this for the JVM I feel it would immediately ring a bell to all the users.

git push origin "latest"
- name: "📝 Publish a release"
run: |
gh release create "latest" build/graalvm-reachability-metadata-*.zip --title "Latest"
Copy link
Member

Choose a reason for hiding this comment

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

Missing line

@vjovanov
Copy link
Member

LGTM

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.

4 participants