10000 [feat] Upload Release Java artifacts to GitHub releases · Issue #1798 · aeron-io/aeron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[feat] Upload Release Java artifacts to GitHub releases #1798

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

Open
Lordfirespeed opened this issue May 12, 2025 · 3 comments
Open

[feat] Upload Release Java artifacts to GitHub releases #1798

Lordfirespeed opened this issue May 12, 2025 · 3 comments

Comments

@Lordfirespeed
Copy link
Lordfirespeed commented May 12, 2025

This would be helpful for e.g. getting the latest version of the Java Media driver for use with the Aeron.NET C# bindings for Aeron.

I am happy to contribute on this.

Usually such an arrangement entails giving Actions access to upload to releases, and then adding the relevant actions step.

Option 1 for permissions setup - less secure

Give actions 'write' permissions on the repository.
Image

Option 2 for permissions setup - more secure

A user with write access to the repository creates a 'fine-grained' Personal Access Token here:

  • Resource owner -> aeron-io
  • Expiration -> custom -> 1 year
  • Repository access -> selected repositories -> this repository
  • Repository permissions -> 'Contents' -> 'Read and Write'
Image

The generated PAT is added as a new 'repository secret' here
Image

Add step to Release workflow

- name: Upload artifacts to Release
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # if permissions option 1
    GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}  # if permissions option 2
  run: gh release upload ${{ TAG NAME EXPRESSION }} [file paths...]

TAG NAME EXPRESSION

  • For workflow runs triggered by release event, github.event.release.tag_name will expand to the tag name
  • For workflow runs triggered by push event with tags filter, github.ref_name should expand to the tag name ( I am not certain, but relatively confident )
@vyazelenko
Copy link
Contributor

@Lordfirespeed Why is this needed?

Aeron artifacts are released to Maven Central. See https://mvnrepository.com/artifact/io.aeron. Here is a direct link to the latest media driver jar: https://repo1.maven.org/maven2/io/aeron/aeron-driver/1.47.5/aeron-driver-1.47.5.jar.

@Lordfirespeed
Copy link
Author
Lordfirespeed commented May 12, 2025

@vyazelenko

for use with the Aeron.NET C# bindings for Aeron.

https://github.com/AdaptiveConsulting/Aeron.NET/

From the README for that project:

Media Driver

[...]

To run the media driver, you will need Java 8 JRE installed.

There is a nuget package that contains the driver: https://www.nuget.org/packages/Aeron.Driver

The NuGet package is outdated, but contains a standalone .jar for the media driver which can be executed like:

java -cp media-driver.jar io.aeron.driver.MediaDriver

Note that there are significant differences between the bundled version (1.40.0) of the media driver and the latest version:

  • the latest media driver requires Java 17, not 8
  • the latest media driver is not a standalone .jar (or at least, the one on Maven isn't) - it depends on aeron-client, aeron-annotations, agrona
  • the latest media driver requires --add-exports java.base/jdk.internal.misc=ALL-UNNAMED to be passed to the java CLI because Agrona accesses Java internals

Modern .NET tooling means that installed packages' files are no longer kept among project files. They are stored in the user's NuGet cache: ~/.nuget/packages/[package]/[version]/...
So distributing the Media Driver this w 7FEF ay for use with Aeron.NET is not convenient for the user.

Attaching a standalone media driver .jar to the GitHub releases in this repository would be a pleasant quality-of-life feature for users of Aeron.NET.

All that said - In the time since I posted this issue, I've written a Bash script for getting the media driver from Maven and running that. If you're not interested in this approach to solving the problem, perhaps we can approach it by updating documentation / adding scripts to Aeron.NET?

@vyazelenko
Copy link
Contributor

@Lordfirespeed Aeron has two implementations of the media driver: one in Java and one in C. Aeron client can use either. It is weird that Aeron.NET comes with a Java version of the MediaDriver out of the box.

@JPWatson Any thoughts?

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

No branches or pull requests

2 participants
0