Skip to content

build: use JReleaser for PR builds (same layout as early-access)#2566

Open
maxandersen wants to merge 1 commit into
mainfrom
pr-builds-workflow
Open

build: use JReleaser for PR builds (same layout as early-access)#2566
maxandersen wants to merge 1 commit into
mainfrom
pr-builds-workflow

Conversation

@maxandersen

Copy link
Copy Markdown
Collaborator

Follow-up to #2562. Reworks publish-pr-build.yml to use JReleaser instead of manually packaging tar/zip files.

What changed

  • Downloads the full shared-build artifact (not just shared-build-jbang) — has pre-built jbang.tar, jbang.zip, versioned variants, and checksums
  • Downloads native bundles from all 3 OS matrix jobs — PR builds now include native images like early-access
  • Runs JReleaser with env var overrides to target jbang-pr-builds repo:
    • JRELEASER_RELEASE_GITHUB_REPO=jbang-pr-builds
    • JRELEASER_RELEASE_GITHUB_TAG_NAME=pr-<number>
    • JRELEASER_SIGNING_ACTIVE=NEVER (no GPG for PR builds)
  • Checks out the PR commit so JReleaser reads the correct jreleaser.yml

Result

PR build releases have the exact same artifact layout as early-access — same filenames, checksums, native bundles. No hand-rolled packaging.

Add two workflows:

- publish-pr-build: triggered via workflow_run after ci-build succeeds
  on a PR. Downloads the build artifact, packages it as jbang.tar/zip,
  creates a release in jbangdev/jbang-pr-builds tagged pr-<number>,
  and comments on the PR with install instructions.

- cleanup-pr-builds: deletes the release when the PR is closed/merged
  (via pull_request_target), plus a weekly cron that removes any
  releases older than 30 days as a safety net.

Users can test a PR build with:
  JBANG_DOWNLOAD_URL=https://github.com/jbangdev/jbang-pr-builds/releases/download/pr-NNN/jbang.tar jbang version

Prerequisites:
- Create jbangdev/jbang-pr-builds repo (public, empty)
- Add PR_BUILDS_TOKEN secret to jbangdev/jbang with write access
  to jbangdev/jbang-pr-builds releases
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ai-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e6cdbf39-e121-4574-9097-033829345d1a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant