Skip to content

[fix] Publish executable jar as github release#63

Merged
unidevel merged 1 commit intoprestodb:masterfrom
unidevel:publish-fix
Mar 30, 2026
Merged

[fix] Publish executable jar as github release#63
unidevel merged 1 commit intoprestodb:masterfrom
unidevel:publish-fix

Conversation

@unidevel
Copy link
Copy Markdown
Contributor

@unidevel unidevel requested review from a team as code owners March 27, 2026 18:58
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 27, 2026

Reviewer's Guide

This PR moves the executable JAR build logic into a dedicated Maven profile and updates the GitHub Actions release workflow to build with that profile and upload the generated executable JARs (and tarballs) as release assets for the tagged version.

Flow diagram for Maven executable-jar profile build

flowchart TD
    A[Invoke Maven: mvn clean package -Pexecutable-jar -DskipTests] --> B[Activate profile executable-jar]
    B --> C[maven-shade-plugin execution in package phase]
    C --> D[Create shaded JAR]
    D --> E[Attach shaded artifact with classifier executable]

    B --> F[really-executable-jar-maven-plugin execution in package phase]
    F --> G[Wrap shaded JAR as really executable JAR with -Xmx1G]

    E --> H[Artifacts in presto-release-tools/target/]
    G --> H
Loading

File-Level Changes

Change Details Files
Isolate executable JAR packaging into an opt‑in Maven profile.
  • Remove always-on maven-shade-plugin and really-executable-jar-maven-plugin configurations from the main build plugins section.
  • Introduce a new Maven profile named 'executable-jar' that redefines the shade and really-executable-jar plugin executions bound to the package phase.
  • Ensure the shaded JAR is attached with the 'executable' classifier and Main-Class taken from the existing ${main-class} property.
presto-release-tools/pom.xml
Extend the release GitHub Actions workflow to build and publish executable artifacts for the release tag.
  • Add a step to check out the release tag (RELEASE_VERSION) and run 'mvn clean package -Pexecutable-jar -DskipTests' to produce executable JARs.
  • Add a step using softprops/action-gh-release@v2 to upload executable JARs and tar.gz artifacts from the presto-release-tools target directory to the GitHub Release corresponding to the tag.
  • Configure the release upload step to fail if the expected artifact files are not found, and to authenticate using the provided GITHUB_TOKEN secret.
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@unidevel unidevel requested review from tdcmeehan and yhwang March 27, 2026 18:58
Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've found 1 issue, and left some high level feedback:

  • Moving the shade/really-executable plugins into the executable-jar profile means the default build no longer produces the executable JAR; if any existing automation or consumers rely on that default behavior, consider either keeping the plugins active by default or documenting/renaming the profile to make the change in behavior explicit.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Moving the shade/really-executable plugins into the `executable-jar` profile means the default build no longer produces the executable JAR; if any existing automation or consumers rely on that default behavior, consider either keeping the plugins active by default or documenting/renaming the profile to make the change in behavior explicit.

## Individual Comments

### Comment 1
<location path=".github/workflows/release.yml" line_range="90-93" />
<code_context>
           git log --pretty="format:%ce: %s" -5
           git push origin master --tags
+
+      - name: Build executable jars
+        run: |
+          git checkout ${{ env.RELEASE_VERSION }}
+          mvn clean package -Pexecutable-jar -DskipTests
+
+      - name: Publish executable jars to GitHub Release
</code_context>
<issue_to_address>
**suggestion (performance):** Limit the Maven build to the `presto-release-tools` module to avoid unnecessary work.

Since only `presto-release-tools/target/...` artifacts are used later, you can restrict the build to that module by either:

- Adding `-pl presto-release-tools -am` to the Maven command, or
- Setting `working-directory: presto-release-tools` and running `mvn clean package -Pexecutable-jar -DskipTests` there.

This keeps the build focused and faster.

```suggestion
      - name: Build executable jars
        run: |
          git checkout ${{ env.RELEASE_VERSION }}
          mvn clean package -pl presto-release-tools -am -Pexecutable-jar -DskipTests
```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Create release tag first

Create release tag first
Copy link
Copy Markdown
Member

@yhwang yhwang left a comment

Choose a reason for hiding this comment

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

/LGTM

Copy link
Copy Markdown
Contributor

@tdcmeehan tdcmeehan left a comment

Choose a reason for hiding this comment

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

Thanks a lot @unidevel!

@unidevel unidevel merged commit a468edf into prestodb:master Mar 30, 2026
2 checks passed
unidevel added a commit to prestodb/presto that referenced this pull request Mar 31, 2026
#27466)

## Description
1. presto-release-tools can not be fetched due to maven central
publishing limitation
2. check maven central publishing requirements
3. add required `<name>` field to presto-lance 

## Motivation and Context
Depends on PRs:
- prestodb/presto-release-tools#65
- prestodb/presto-release-tools#64
- prestodb/presto-release-tools#63
- prestodb/presto-release-tools#62

## Impact
CI

## Test Plan
Tested with:
1. release note check action:
https://github.com/prestodb/presto/actions/runs/23815800338/job/69414865062?pr=27466
2. maven central publishing requirements check:
https://github.com/unix280/presto/actions/runs/23812452401/job/69402863222#step:8:76
3. Prepare release action in presto =>
https://github.com/unix280/presto/actions/runs/23812844511
4. Release notes PR => unix280#52
5. Release notes missing list file =>
https://github.com/unix280/presto/blob/release-notes-0.297/release-notes-missing-0.297.md

## Contributor checklist

- [ ] Please make sure your submission complies with our [contributing
guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md),
in particular [code
style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style)
and [commit
standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards).
- [ ] PR description addresses the issue accurately and concisely. If
the change is non-trivial, a GitHub Issue is referenced.
- [ ] Documented new properties (with its default value), SQL syntax,
functions, or other functionality.
- [ ] If release notes are required, they follow the [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines).
- [ ] Adequate tests were added if applicable.
- [ ] CI passed.
- [ ] If adding new dependencies, verified they have an [OpenSSF
Scorecard](https://securityscorecards.dev/#the-checks) score of 5.0 or
higher (or obtained explicit TSC approval for lower scores).

## Release Notes
Please follow [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines)
and fill in the release notes below.

```
== NO RELEASE NOTE ==
```

## Summary by Sourcery

Update CI and release scripts to retrieve presto-release-tools from
GitHub releases using a configurable version instead of Maven Central.

CI:
- Change release-notes-check workflow to download the
presto-release-tools executable directly from GitHub releases and run it
from a temporary path.
- Make the release-notes-check workflow use a configurable
RELEASE_TOOLS_VERSION with a default of 0.13.

Deployment:
- Update release preparation workflow and release-notes script to use a
configurable RELEASE_TOOLS_VERSION (default 0.13) and fetch
presto-release-tools from GitHub releases instead of Maven.

Chores:
- Align release tooling version and retrieval method across CI workflows
and release scripts.
bibith4 pushed a commit to bibith4/presto that referenced this pull request Apr 1, 2026
prestodb#27466)

## Description
1. presto-release-tools can not be fetched due to maven central
publishing limitation
2. check maven central publishing requirements
3. add required `<name>` field to presto-lance 

## Motivation and Context
Depends on PRs:
- prestodb/presto-release-tools#65
- prestodb/presto-release-tools#64
- prestodb/presto-release-tools#63
- prestodb/presto-release-tools#62

## Impact
CI

## Test Plan
Tested with:
1. release note check action:
https://github.com/prestodb/presto/actions/runs/23815800338/job/69414865062?pr=27466
2. maven central publishing requirements check:
https://github.com/unix280/presto/actions/runs/23812452401/job/69402863222#step:8:76
3. Prepare release action in presto =>
https://github.com/unix280/presto/actions/runs/23812844511
4. Release notes PR => unix280#52
5. Release notes missing list file =>
https://github.com/unix280/presto/blob/release-notes-0.297/release-notes-missing-0.297.md

## Contributor checklist

- [ ] Please make sure your submission complies with our [contributing
guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md),
in particular [code
style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style)
and [commit
standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards).
- [ ] PR description addresses the issue accurately and concisely. If
the change is non-trivial, a GitHub Issue is referenced.
- [ ] Documented new properties (with its default value), SQL syntax,
functions, or other functionality.
- [ ] If release notes are required, they follow the [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines).
- [ ] Adequate tests were added if applicable.
- [ ] CI passed.
- [ ] If adding new dependencies, verified they have an [OpenSSF
Scorecard](https://securityscorecards.dev/#the-checks) score of 5.0 or
higher (or obtained explicit TSC approval for lower scores).

## Release Notes
Please follow [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines)
and fill in the release notes below.

```
== NO RELEASE NOTE ==
```

## Summary by Sourcery

Update CI and release scripts to retrieve presto-release-tools from
GitHub releases using a configurable version instead of Maven Central.

CI:
- Change release-notes-check workflow to download the
presto-release-tools executable directly from GitHub releases and run it
from a temporary path.
- Make the release-notes-check workflow use a configurable
RELEASE_TOOLS_VERSION with a default of 0.13.

Deployment:
- Update release preparation workflow and release-notes script to use a
configurable RELEASE_TOOLS_VERSION (default 0.13) and fetch
presto-release-tools from GitHub releases instead of Maven.

Chores:
- Align release tooling version and retrieval method across CI workflows
and release scripts.
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