From 987683045f065a962407323624070a8abe0b7bcf Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sat, 23 May 2026 09:25:16 +0200 Subject: [PATCH 01/11] build: update CI and release for native bundles and latest jreleaser CI (step-ci-build.yml): - Build native bundles (nativeDistZip/nativeDistTar) per platform - Upload native bundles as artifacts - Add jreleaser dry-run job to validate release process on PRs Release (tag-and-release.yml): - Reuse step-ci-build.yml as a called workflow for build/test/native bundles - Release job downloads artifacts from CI and runs JReleaser - Update jreleaser from 1.19.0 to 1.24.0 - Fix deprecated set-output to use GITHUB_OUTPUT Build (build.gradle): - Add nativeDistZip and nativeDistTar tasks - Add getNativeBundleOs/Arch/BaseName helpers for consistent naming - Fix commonSpec native image inclusion to be lazy (not config-time) JReleaser (jreleaser.yml): - Add native bundle artifacts (mac-aarch64, linux-x64, windows-x64) as optional release files (active: RELEASE, skipArtifact on missing) Split from #2467. --- .github/workflows/main-build.yml | 57 ++++++---- .github/workflows/step-ci-build.yml | 69 ++++++++++++ .github/workflows/tag-and-release.yml | 149 +++++++++++++++++++++----- build.gradle | 88 +++++++++++++-- jreleaser.yml | 30 ++++++ 5 files changed, 336 insertions(+), 57 deletions(-) diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index 77ba7e78f..27e71da7e 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -1,8 +1,7 @@ name: main-build -## Intent is to run the ci-build workflow and download the artifacts -## and perform as much of jreleaser flow as possible and publish -## as an ever moving earlyaccess release. +## Runs full CI on every push to main and publishes an earlyaccess +## pre-release with the latest artifacts (including native bundles). on: push: @@ -17,33 +16,51 @@ concurrency: jobs: ci-build: uses: ./.github/workflows/step-ci-build.yml - with: - skip_tests: true # temporary until we have jreleaser parts working - - jreleaser: + + earlyaccess: needs: ci-build runs-on: ubuntu-latest + env: + JRELEASER_VERSION: 1.24.0 steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: fetch-depth: 0 - id: shared-build uses: ./.github/actions/shared-build-setup - with: - java-version: 11 - - name: Download jbang distribution + - name: Download build artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: - name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build-jbang - path: build/install/jbang - - - name: Download native image' + name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build + path: build + - name: Download native bundles uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: - pattern: ${{ steps.shared-build.outputs.github-short-sha }}-jbang.bin-* - path: build/native-image - - - name: Show workspace tree + pattern: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-* + path: build/distributions + merge-multiple: true + if-no-files-found: warn + - name: version extract + id: version run: | - echo "Workspace: $GITHUB_WORKSPACE" - tree -a build + RELEASE_VERSION=`cat build/tmp/version.txt` + echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" + echo "Release version: $RELEASE_VERSION" + ls -la build/distributions + - name: Run JReleaser (earlyaccess) + uses: jreleaser/release-action@97b5e2f0e845de2fe1dbbdf451ac6a21233fafff # v2 + env: + JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.RELEASE_VERSION }} + JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + version: ${{ env.JRELEASER_VERSION }} + arguments: full-release + setup-java: false + - name: JReleaser output + if: always() + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + with: + name: jreleaser-earlyaccess + path: | + out/jreleaser/trace.log + out/jreleaser/output.properties diff --git a/.github/workflows/step-ci-build.yml b/.github/workflows/step-ci-build.yml index d1ddb2a65..c6ca08a70 100644 --- a/.github/workflows/step-ci-build.yml +++ b/.github/workflows/step-ci-build.yml @@ -17,6 +17,11 @@ on: required: false type: boolean default: false + skip_jreleaser_dry_run: + description: 'Skip JReleaser dry-run (e.g. when called from release workflow)' + required: false + type: boolean + default: false workflow_call: inputs: *inputs @@ -92,6 +97,19 @@ jobs: name: ${{ steps.shared-build.outputs.github-short-sha }}-jbang.bin-${{ matrix.os }} path: build/native-image/* if-no-files-found: error + + - name: build-native-bundles + run: | + ./gradlew --no-daemon nativeDistZip nativeDistTar latestNativeDistZip latestNativeDistTar + + - name: upload-native-bundles + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-${{ matrix.os }} + path: | + build/distributions/*-${{ runner.os == 'macOS' && 'mac' || runner.os == 'Windows' && 'windows' || 'linux' }}-*.zip + build/distributions/*-${{ runner.os == 'macOS' && 'mac' || runner.os == 'Windows' && 'windows' || 'linux' }}-*.tar + if-no-files-found: error - name: create install with jbang.bin if: ${{ !inputs.skip_tests }} @@ -284,6 +302,57 @@ jobs: chmod +x ./test_suite.sh ./test_suite.sh + jreleaser-dry-run: + needs: [build-shared, build-test-native-image] + if: always() && needs.build-shared.result == 'success' && !inputs.skip_jreleaser_dry_run + runs-on: ubuntu-latest + env: + JRELEASER_VERSION: 1.24.0 + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + - id: shared-build + uses: ./.github/actions/shared-build-setup + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build + path: build + - name: Download native bundles + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + pattern: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-* + path: build/distributions + merge-multiple: true + if-no-files-found: warn + - name: version extract + id: version + run: | + RELEASE_VERSION=`cat build/tmp/version.txt` + echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" + echo "Release version: $RELEASE_VERSION" + ls -la build/distributions + - name: Run JReleaser (dry-run) + uses: jreleaser/release-action@97b5e2f0e845de2fe1dbbdf451ac6a21233fafff # v2 + env: + JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.RELEASE_VERSION }} + JRELEASER_GITHUB_TOKEN: unused-dry-run + JRELEASER_GPG_PASSPHRASE: unused-dry-run + JRELEASER_GPG_PUBLIC_KEY: unused-dry-run + JRELEASER_GPG_SECRET_KEY: unused-dry-run + JRELEASER_MAVENCENTRAL_JBANG_USERNAME: unused-dry-run + JRELEASER_MAVENCENTRAL_JBANG_PASSWORD: unused-dry-run + with: + version: ${{ env.JRELEASER_VERSION }} + arguments: release --dry-run + setup-java: false + - name: Upload release artifacts + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + if: always() + with: + name: ${{ steps.shared-build.outputs.github-short-sha }}-jreleaser-release-artifacts + path: out/jreleaser/ + merge-test-reports: if: always() && !inputs.skip_tests needs: [unit-test-jvm, integration-test-jvm, build-test-native-image] diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index f2cd9f686..b809c68fb 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -22,10 +22,111 @@ jobs: echo "debug_enabled=false" >> $GITHUB_OUTPUT fi - build: - needs: check-debug + validate-release: runs-on: ubuntu-latest - name: build-and-testing + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + - name: Verify commit is on main + run: | + if ! git merge-base --is-ancestor ${{ github.sha }} origin/main; then + echo "::error::Tagged commit is not on the main branch. Aborting release." + exit 1 + fi + - name: Verify CI passed for this commit + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + STATUS=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }}/status --jq '.state') + echo "Commit CI status: $STATUS" + if [ "$STATUS" != "success" ]; then + echo "::error::CI has not passed for this commit (status: $STATUS). Aborting release." + exit 1 + fi + + build-shared: + needs: validate-release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + - id: shared-build + uses: ./.github/actions/shared-build-setup + - name: build + run: ./gradlew --no-daemon clean build installDist publish -x spotlessCheck -x test -x integrationTest --build-cache --scan -s + - name: Upload build results + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build + path: build + + build-native-image: + needs: build-shared + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + - id: shared-build + uses: ./.github/actions/shared-build-setup + - name: setup-graalvm + uses: graalvm/setup-graalvm@eec48106e0bf45f2976c2ff0c3e22395cced8243 # v1 + with: + java-version: '25' + distribution: 'graalvm-community' + github-token: ${{ secrets.GITHUB_TOKEN }} + set-java-home: false + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build + path: build + - name: build-native-image + run: ./gradlew --no-daemon nativeImage + - name: ensure native image is executable + run: chmod -v +x build/native-image/jbang.bin* + - name: build-native-bundles + run: ./gradlew --no-daemon nativeDistZip nativeDistTar latestNativeDistZip latestNativeDistTar + - name: upload-native-bundles + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-${{ matrix.os }} + path: | + build/distributions/*-${{ runner.os == 'macOS' && 'mac' || runner.os == 'Windows' && 'windows' || 'linux' }}-*.zip + build/distributions/*-${{ runner.os == 'macOS' && 'mac' || runner.os == 'Windows' && 'windows' || 'linux' }}-*.tar + if-no-files-found: error + + smoke-test: + needs: build-shared + runs-on: ubuntu-latest + env: + _JBANG_: ./build/install/jbang/bin/jbang + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + - id: shared-build + uses: ./.github/actions/shared-build-setup + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build + path: build + - name: smoke-test + run: | + chmod +x $_JBANG_ + $_JBANG_ init --template=cli helloworld.java + $_JBANG_ --verbose helloworld.java + rm helloworld.java + + release: + needs: [check-debug, build-shared, build-native-image, smoke-test] + runs-on: ubuntu-latest + name: release env: JRELEASER_SDKMAN_CONSUMER_KEY: ${{ secrets.SDKMAN_CONSUMER_KEY }} JRELEASER_SDKMAN_CONSUMER_TOKEN: ${{ secrets.SDKMAN_CONSUMER_TOKEN }} @@ -40,7 +141,7 @@ jobs: JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} JRELEASER_MAVENCENTRAL_JBANG_USERNAME: ${{ secrets.OSSRH_USERNAME }} JRELEASER_MAVENCENTRAL_JBANG_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - JRELEASER_VERSION: 1.19.0 + JRELEASER_VERSION: 1.24.0 steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: @@ -49,35 +150,29 @@ jobs: uses: ./.github/actions/shared-build-setup with: java-version: 11 - - name: build-gradle - run: ./gradlew --no-daemon clean build installDist publish --build-cache --scan -s - - name: integration-test - env: - _JBANG_TEST_JAVA_VERSION: 11 - run: | - ./gradlew integrationTest - - name: Arcive test results - uses: ./.github/actions/shared-test-archiving - if: always() + - name: Download build artifacts + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 with: - prefix: ${{ steps.shared-build.outputs.github-short-sha }}-integration-test- - suffix: -jvm - - name: integration-test-bash - run: | - export PATH=`pwd`/build/install/jbang/bin:$PATH - pastdir=`pwd` - cd itests - ./test_suite.sh - cd $pastdir + name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build + path: build + - name: Download native bundles + uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + pattern: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-* + path: build/distributions + merge-multiple: true + if-no-files-found: error - name: version extract id: version run: | RELEASE_VERSION=`cat build/tmp/version.txt` - echo "::set-output name=RELEASE_VERSION::$RELEASE_VERSION" + echo "RELEASE_VERSION=$RELEASE_VERSION" >> "$GITHUB_OUTPUT" + echo "Release version: $RELEASE_VERSION" + ls -la build/distributions - name: Run JReleaser uses: jreleaser/release-action@97b5e2f0e845de2fe1dbbdf451ac6a21233fafff # v2 - env: - JRELEASER_PROJECT_VERSION: ${{steps.version.outputs.RELEASE_VERSION}} + env: + JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.RELEASE_VERSION }} with: version: ${{ env.JRELEASER_VERSION }} arguments: release @@ -90,7 +185,7 @@ jobs: path: | out/jreleaser/trace.log out/jreleaser/output.properties - + - name: Start tmate session if: always() && needs.check-debug.outputs.debug_enabled == 'true' uses: mxschmitt/action-tmate@c0afd6f790e3a5564914980036ebf83216678101 # v3 diff --git a/build.gradle b/build.gradle index c1b52f385..687fbeca0 100644 --- a/build.gradle +++ b/build.gradle @@ -248,7 +248,7 @@ nisseConfig { jgit { countingVersion = true countingStartPatch = 1 - appendSnapshot = false + appendSnapshot = true countingPattern = '%M.%m.%p(.%c)' } os { @@ -298,13 +298,14 @@ def commonSpec = project.copySpec { include 'jbang.ps1' into 'bin' } - // Conditionally include native image binary if it exists + // Include native image binary renamed to platform-specific name + // Scripts can also look for a generic 'jbang.bin' dropped in manually by users def nativeExecName = getNativeExecutableName() - if (project.file("${project.buildDir}/native-image/${nativeExecName}").exists()) { - from(project.buildDir.toPath().resolve('native-image')) { - include nativeExecName - into 'bin' - } + def platformNativeExecName = getPlatformNativeExecutableName() + from(project.buildDir.toPath().resolve('native-image')) { + include nativeExecName + rename nativeExecName, platformNativeExecName + into 'bin' } } @@ -325,11 +326,36 @@ latestDistZip { archiveFileName = "${project.name}.zip" } - latestDistTar { archiveFileName = "${project.name}.tar" } +tasks.register('nativeDistZip', Zip) { + dependsOn('nativeImage') + with commonSpec + archiveFileName.set(provider { "${getNativeBundleBaseName()}.zip" }) +} + +tasks.register('nativeDistTar', Tar) { + dependsOn('nativeImage') + with commonSpec + compression = Compression.NONE + archiveFileName.set(provider { "${getNativeBundleBaseName()}.tar" }) +} + +tasks.register('latestNativeDistZip', Zip) { + dependsOn('nativeImage') + with commonSpec + archiveFileName.set(provider { "${getLatestNativeBundleBaseName()}.zip" }) +} + +tasks.register('latestNativeDistTar', Tar) { + dependsOn('nativeImage') + with commonSpec + compression = Compression.NONE + archiveFileName.set(provider { "${getLatestNativeBundleBaseName()}.tar" }) +} + jar { manifest { attributes( @@ -664,8 +690,9 @@ def generateParentSuite(boolean isIntegrationTest = false, org.gradle.jvm.toolch return parts.join('-') } -// Function to get the correct native executable name based on OS -def getNativeExecutableName() { +// Functions to derive native bundle metadata based on the current platform +// Base native executable name as produced by the nativeImage task +String getNativeExecutableName() { def osName = System.getProperty('os.name').toLowerCase() if (osName.contains('windows')) { return 'jbang.bin.exe' @@ -674,6 +701,47 @@ def getNativeExecutableName() { } } +// Platform-specific native binary name for distribution bundles +String getPlatformNativeExecutableName() { + def os = getNativeBundleOs() + def arch = getNativeBundleArch() + if (os == 'windows') { + return "jbang-${os}-${arch}.bin.exe" + } else { + return "jbang-${os}-${arch}.bin" + } +} + +String getNativeBundleOs() { + def osName = System.getProperty('os.name').toLowerCase() + if (osName.contains('mac') || osName.contains('darwin')) { + return 'mac' + } else if (osName.contains('windows')) { + return 'windows' + } else { + return 'linux' + } +} + +String getNativeBundleArch() { + def arch = System.getProperty('os.arch').toLowerCase() + if (arch == 'x86_64' || arch == 'amd64') { + return 'x64' + } else if (arch == 'aarch64' || arch == 'arm64') { + return 'aarch64' + } else { + return arch.replaceAll('[^a-z0-9_]+', '-') + } +} + +String getNativeBundleBaseName() { + return "${project.name}-${project.version}-${getNativeBundleOs()}-${getNativeBundleArch()}" +} + +String getLatestNativeBundleBaseName() { + return "${project.name}-${getNativeBundleOs()}-${getNativeBundleArch()}" +} + // Configure resource processing for test and integrationTest processTestResources { filesMatching('allure.properties') { diff --git a/jreleaser.yml b/jreleaser.yml index 3808ea664..440d8fa0d 100644 --- a/jreleaser.yml +++ b/jreleaser.yml @@ -92,6 +92,36 @@ files: - path: build/tmp/version.txt - path: build/distributions/jbang.zip - path: build/distributions/jbang.tar + - path: build/distributions/jbang-{{projectVersion}}-mac-aarch64.zip + active: RELEASE + transform: NOOP + - path: build/distributions/jbang-{{projectVersion}}-mac-aarch64.tar + active: RELEASE + transform: NOOP + - path: build/distributions/jbang-{{projectVersion}}-linux-x64.zip + active: RELEASE + transform: NOOP + - path: build/distributions/jbang-{{projectVersion}}-linux-x64.tar + active: RELEASE + transform: NOOP + - path: build/distributions/jbang-{{projectVersion}}-windows-x64.zip + active: RELEASE + transform: NOOP + - path: build/distributions/jbang-{{projectVersion}}-windows-x64.tar + active: RELEASE + transform: NOOP + - path: build/distributions/jbang-mac-aarch64.zip + active: RELEASE + - path: build/distributions/jbang-mac-aarch64.tar + active: RELEASE + - path: build/distributions/jbang-linux-x64.zip + active: RELEASE + - path: build/distributions/jbang-linux-x64.tar + active: RELEASE + - path: build/distributions/jbang-windows-x64.zip + active: RELEASE + - path: build/distributions/jbang-windows-x64.tar + active: RELEASE distributions: jbang: From 8c29d12a8e0b40066065382a59f3fd19e6ea14da Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sat, 23 May 2026 10:28:05 +0200 Subject: [PATCH 02/11] ci: retrigger CI --- .github/workflows/step-ci-build.yml | 11 +++++---- .github/workflows/tag-and-release.yml | 14 ++++++------ build.gradle | 4 ++-- jreleaser.yml | 33 +++------------------------ src/main/scripts/jbang | 17 +++++++++----- src/main/scripts/jbang.cmd | 14 ++++++++---- src/main/scripts/jbang.ps1 | 13 +++++++---- 7 files changed, 48 insertions(+), 58 deletions(-) diff --git a/.github/workflows/step-ci-build.yml b/.github/workflows/step-ci-build.yml index c6ca08a70..89c2a991d 100644 --- a/.github/workflows/step-ci-build.yml +++ b/.github/workflows/step-ci-build.yml @@ -103,7 +103,7 @@ jobs: ./gradlew --no-daemon nativeDistZip nativeDistTar latestNativeDistZip latestNativeDistTar - name: upload-native-bundles - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-${{ matrix.os }} path: | @@ -111,9 +111,10 @@ jobs: build/distributions/*-${{ runner.os == 'macOS' && 'mac' || runner.os == 'Windows' && 'windows' || 'linux' }}-*.tar if-no-files-found: error - - name: create install with jbang.bin + - name: create install with native binary if: ${{ !inputs.skip_tests }} run: | + rm -rf build/install/jbang ./gradlew --no-daemon installDist - name: integration-test-native-image if: ${{ !inputs.skip_tests }} @@ -314,12 +315,12 @@ jobs: fetch-depth: 0 - id: shared-build uses: ./.github/actions/shared-build-setup - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build path: build - name: Download native bundles - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: pattern: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-* path: build/distributions @@ -347,7 +348,7 @@ jobs: arguments: release --dry-run setup-java: false - name: Upload release artifacts - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 if: always() with: name: ${{ steps.shared-build.outputs.github-short-sha }}-jreleaser-release-artifacts diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index b809c68fb..86cf9c2f4 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -57,7 +57,7 @@ jobs: - name: build run: ./gradlew --no-daemon clean build installDist publish -x spotlessCheck -x test -x integrationTest --build-cache --scan -s - name: Upload build results - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build path: build @@ -76,13 +76,13 @@ jobs: - id: shared-build uses: ./.github/actions/shared-build-setup - name: setup-graalvm - uses: graalvm/setup-graalvm@eec48106e0bf45f2976c2ff0c3e22395cced8243 # v1 + uses: graalvm/setup-graalvm@bef4b0e916c7dd079bf60fb95d49139f67e32c5f # v1 with: java-version: '25' distribution: 'graalvm-community' github-token: ${{ secrets.GITHUB_TOKEN }} set-java-home: false - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build path: build @@ -93,7 +93,7 @@ jobs: - name: build-native-bundles run: ./gradlew --no-daemon nativeDistZip nativeDistTar latestNativeDistZip latestNativeDistTar - name: upload-native-bundles - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 with: name: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-${{ matrix.os }} path: | @@ -112,7 +112,7 @@ jobs: fetch-depth: 0 - id: shared-build uses: ./.github/actions/shared-build-setup - - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build path: build @@ -151,12 +151,12 @@ jobs: with: java-version: 11 - name: Download build artifacts - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: name: ${{ steps.shared-build.outputs.github-short-sha }}-shared-build path: build - name: Download native bundles - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 with: pattern: ${{ steps.shared-build.outputs.github-short-sha }}-jbang-native-bundles-* path: build/distributions diff --git a/build.gradle b/build.gradle index 687fbeca0..3efb4c7f0 100644 --- a/build.gradle +++ b/build.gradle @@ -298,8 +298,8 @@ def commonSpec = project.copySpec { include 'jbang.ps1' into 'bin' } - // Include native image binary renamed to platform-specific name - // Scripts can also look for a generic 'jbang.bin' dropped in manually by users + // Include native image binary renamed to platform-specific name (e.g. jbang-linux-x64.bin) + // Scripts look for the platform-named binary first, then fall back to jbang.bin def nativeExecName = getNativeExecutableName() def platformNativeExecName = getPlatformNativeExecutableName() from(project.buildDir.toPath().resolve('native-image')) { diff --git a/jreleaser.yml b/jreleaser.yml index 440d8fa0d..93585ee91 100644 --- a/jreleaser.yml +++ b/jreleaser.yml @@ -92,36 +92,9 @@ files: - path: build/tmp/version.txt - path: build/distributions/jbang.zip - path: build/distributions/jbang.tar - - path: build/distributions/jbang-{{projectVersion}}-mac-aarch64.zip - active: RELEASE - transform: NOOP - - path: build/distributions/jbang-{{projectVersion}}-mac-aarch64.tar - active: RELEASE - transform: NOOP - - path: build/distributions/jbang-{{projectVersion}}-linux-x64.zip - active: RELEASE - transform: NOOP - - path: build/distributions/jbang-{{projectVersion}}-linux-x64.tar - active: RELEASE - transform: NOOP - - path: build/distributions/jbang-{{projectVersion}}-windows-x64.zip - active: RELEASE - transform: NOOP - - path: build/distributions/jbang-{{projectVersion}}-windows-x64.tar - active: RELEASE - transform: NOOP - - path: build/distributions/jbang-mac-aarch64.zip - active: RELEASE - - path: build/distributions/jbang-mac-aarch64.tar - active: RELEASE - - path: build/distributions/jbang-linux-x64.zip - active: RELEASE - - path: build/distributions/jbang-linux-x64.tar - active: RELEASE - - path: build/distributions/jbang-windows-x64.zip - active: RELEASE - - path: build/distributions/jbang-windows-x64.tar - active: RELEASE + globs: + - pattern: build/distributions/jbang-*-*.zip + - pattern: build/distributions/jbang-*-*.tar distributions: jbang: diff --git a/src/main/scripts/jbang b/src/main/scripts/jbang index d8effa46d..cad7b68ee 100755 --- a/src/main/scripts/jbang +++ b/src/main/scripts/jbang @@ -229,22 +229,27 @@ if [[ -z "$JBANG_DIR" ]]; then JBDIR="$HOME/.jbang"; else JBDIR="$JBANG_DIR"; fi if [[ -z "$JBANG_CACHE_DIR" ]]; then TDIR="$JBDIR/cache"; else TDIR="$JBANG_CACHE_DIR"; fi if [[ -z "$JBANG_USE_NATIVE" ]]; then JBANG_USE_NATIVE="false"; fi -## resolve jbang.bin binary or jar path from script location +## resolve native binary or jar path from script location binaryPath="" jarPath="" if [[ "$JBANG_USE_NATIVE" == "true" ]]; then - # Look for native binary first if enabled + # Look for platform-specific native binary first (e.g. jbang-linux-x64.bin), + # then fall back to generic jbang.bin for manually placed binaries if [[ "$os" == "windows" ]]; then - if [ -f "$abs_jbang_dir/jbang.bin.exe" ] && [ -x "$abs_jbang_dir/jbang.bin.exe" ]; then + if [ -f "$abs_jbang_dir/jbang-${os}-${arch}.bin.exe" ] && [ -x "$abs_jbang_dir/jbang-${os}-${arch}.bin.exe" ]; then + binaryPath="$abs_jbang_dir/jbang-${os}-${arch}.bin.exe" + elif [ -f "$abs_jbang_dir/jbang.bin.exe" ] && [ -x "$abs_jbang_dir/jbang.bin.exe" ]; then binaryPath="$abs_jbang_dir/jbang.bin.exe" else - echo "WARNING: JBang native binary (jbang.bin.exe) not found in $abs_jbang_dir" 1>&2 + echo "WARNING: JBang native binary not found in $abs_jbang_dir" 1>&2 fi else - if [ -f "$abs_jbang_dir/jbang.bin" ] && [ -x "$abs_jbang_dir/jbang.bin" ]; then + if [ -f "$abs_jbang_dir/jbang-${os}-${arch}.bin" ] && [ -x "$abs_jbang_dir/jbang-${os}-${arch}.bin" ]; then + binaryPath="$abs_jbang_dir/jbang-${os}-${arch}.bin" + elif [ -f "$abs_jbang_dir/jbang.bin" ] && [ -x "$abs_jbang_dir/jbang.bin" ]; then binaryPath="$abs_jbang_dir/jbang.bin" else - echo "WARNING: JBang native binary (jbang.bin) not found or not executable in $abs_jbang_dir" 1>&2 + echo "WARNING: JBang native binary not found or not executable in $abs_jbang_dir" 1>&2 fi fi fi diff --git a/src/main/scripts/jbang.cmd b/src/main/scripts/jbang.cmd index c54764c8c..cc1103f0c 100644 --- a/src/main/scripts/jbang.cmd +++ b/src/main/scripts/jbang.cmd @@ -8,15 +8,21 @@ if "%JBANG_DIR%"=="" (set JBDIR=%userprofile%\.jbang) else (set JBDIR=%JBANG_DIR if "%JBANG_CACHE_DIR%"=="" (set TDIR=%JBDIR%\cache) else (set TDIR=%JBANG_CACHE_DIR%) if "%JBANG_USE_NATIVE%"=="" (set JBANG_USE_NATIVE=false) -rem resolve jbang.bin binary or jar path from script location +rem detect architecture for platform-specific binary lookup +set "jbang_arch=x64" +if "%PROCESSOR_ARCHITECTURE%"=="ARM64" set "jbang_arch=aarch64" + +rem resolve native binary or jar path from script location set binaryPath= set jarPath= if "%JBANG_USE_NATIVE%"=="true" ( - rem Look for native binary first if enabled - if exist "%~dp0jbang.bin.exe" ( + rem Look for platform-specific native binary first, then fall back to jbang.bin.exe + if exist "%~dp0jbang-windows-%jbang_arch%.bin.exe" ( + set binaryPath=%~dp0jbang-windows-%jbang_arch%.bin.exe + ) else if exist "%~dp0jbang.bin.exe" ( set binaryPath=%~dp0jbang.bin.exe ) else ( - echo WARNING: JBang native binary (jbang.bin.exe^) not found in %~dp0 1>&2 + echo WARNING: JBang native binary not found in %~dp0 1>&2 ) ) if "!binaryPath!"=="" ( diff --git a/src/main/scripts/jbang.ps1 b/src/main/scripts/jbang.ps1 index 2cc5a2142..bbc8562f6 100644 --- a/src/main/scripts/jbang.ps1 +++ b/src/main/scripts/jbang.ps1 @@ -117,15 +117,20 @@ function Invoke-JBang { $env:JAVA_HOME, $env:JBANG_RUNTIME_SHELL, $env:JBANG_STDIN_NOTTY, $env:JBANG_LAUNCH_CMD=$oldJavaHome, $oldShell, $oldNotty, $oldCmd } -# resolve jbang.bin binary or jar path from script location +# detect architecture for platform-specific binary lookup +$jbang_arch = if ([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture -eq [System.Runtime.InteropServices.Architecture]::Arm64) { "aarch64" } else { "x64" } + +# resolve native binary or jar path from script location $binaryPath="" $jarPath="" if ($env:JBANG_USE_NATIVE -eq "true") { - # Look for native binary first if enabled - if (Test-Path "$PSScriptRoot\jbang.bin.exe") { + # Look for platform-specific native binary first, then fall back to jbang.bin.exe + if (Test-Path "$PSScriptRoot\jbang-windows-${jbang_arch}.bin.exe") { + $binaryPath="$PSScriptRoot\jbang-windows-${jbang_arch}.bin.exe" + } elseif (Test-Path "$PSScriptRoot\jbang.bin.exe") { $binaryPath="$PSScriptRoot\jbang.bin.exe" } else { - [Console]::Error.WriteLine("WARNING: JBang native binary (jbang.bin.exe) not found in $PSScriptRoot") + [Console]::Error.WriteLine("WARNING: JBang native binary not found in $PSScriptRoot") } } if (-not $binaryPath) { From 75f64ff963795e0faad087e9136877d67c66a610 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sun, 24 May 2026 00:26:00 +0200 Subject: [PATCH 03/11] fix: use cleanInstallDist instead of rm -rf for native image install --- .github/workflows/step-ci-build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/step-ci-build.yml b/.github/workflows/step-ci-build.yml index 89c2a991d..f160be69e 100644 --- a/.github/workflows/step-ci-build.yml +++ b/.github/workflows/step-ci-build.yml @@ -114,8 +114,7 @@ jobs: - name: create install with native binary if: ${{ !inputs.skip_tests }} run: | - rm -rf build/install/jbang - ./gradlew --no-daemon installDist + ./gradlew --no-daemon cleanInstallDist installDist - name: integration-test-native-image if: ${{ !inputs.skip_tests }} env: From a0e4a00466a1decbacbeadd054a1e20b3f1d71b6 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sun, 24 May 2026 00:33:53 +0200 Subject: [PATCH 04/11] fix: support platform-named native binaries in IntegrationManager, Wrapper and App IntegrationManager now resolves jbang.jar by directory instead of suffix replacement, so jbang-linux-x64.bin finds jbang.jar correctly. Wrapper and App checks now accept any .bin/.bin.exe suffix instead of hardcoded jbang.bin. --- src/main/java/dev/jbang/cli/App.java | 3 ++- src/main/java/dev/jbang/cli/Wrapper.java | 7 ++----- src/main/java/dev/jbang/spi/IntegrationManager.java | 9 ++++----- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/main/java/dev/jbang/cli/App.java b/src/main/java/dev/jbang/cli/App.java index 2ae9fdcfc..fffabd044 100644 --- a/src/main/java/dev/jbang/cli/App.java +++ b/src/main/java/dev/jbang/cli/App.java @@ -237,7 +237,8 @@ public static boolean installJBang(boolean force) throws IOException { } else { Path jar = Util.getJarLocation(); // TODO: this is duplicated in Wrapper.java - should be more shared. - if (!jar.toString().endsWith(".jar") && !jar.toString().endsWith("jbang.bin")) { + if (!jar.toString().endsWith(".jar") && !jar.toString().endsWith(".bin") + && !jar.toString().endsWith(".bin.exe")) { throw new ExitException(EXIT_GENERIC_ERROR, "Could not determine jbang location from " + jar); } Path fromDir = jar.getParent(); diff --git a/src/main/java/dev/jbang/cli/Wrapper.java b/src/main/java/dev/jbang/cli/Wrapper.java index fab782836..3a5acfe6e 100644 --- a/src/main/java/dev/jbang/cli/Wrapper.java +++ b/src/main/java/dev/jbang/cli/Wrapper.java @@ -38,11 +38,8 @@ public Integer install( } try { Path jar = Util.getJarLocation(); - String exeName = "jbang.bin"; - if (Util.isWindows()) { - exeName = "jbang.bin.exe"; - } - if (!jar.toString().endsWith(".jar") && !jar.toString().endsWith(exeName)) { + String binSuffix = Util.isWindows() ? ".bin.exe" : ".bin"; + if (!jar.toString().endsWith(".jar") && !jar.toString().endsWith(binSuffix)) { throw new ExitException(EXIT_GENERIC_ERROR, "Couldn't find JBang install location via " + jar); } Path parent = jar.getParent(); diff --git a/src/main/java/dev/jbang/spi/IntegrationManager.java b/src/main/java/dev/jbang/spi/IntegrationManager.java index 22f965ca5..e3cb9f97b 100644 --- a/src/main/java/dev/jbang/spi/IntegrationManager.java +++ b/src/main/java/dev/jbang/spi/IntegrationManager.java @@ -245,12 +245,11 @@ protected IntegrationResult runIntegrationExternal(IntegrationInput input, Path jbangJar = Util.getJarLocation(); args.add("-cp"); - String suffix = Util.isWindows() ? ".bin.exe" : ".bin"; if (JavaUtil.inNativeImage() - && (jbangJar.toString().endsWith(suffix))) { - // quick'n dirty way to get the native image to work - // TODO: check if the jar is present and if not, throw descriptive error - args.add(jbangJar.toString().replace(suffix, ".jar")); + && !jbangJar.toString().endsWith(".jar")) { + // When running as native image, find the jar in the same directory + Path jarPath = jbangJar.getParent().resolve("jbang.jar"); + args.add(jarPath.toString()); } else { if (jbangJar.toString().endsWith(".jar")) { args.add(jbangJar.toString()); From 84d64737468ace0979c8de7e7c2fa45e8cd05c67 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sun, 24 May 2026 01:11:34 +0200 Subject: [PATCH 05/11] fix: update VersionIT regex to accept -SNAPSHOT suffix --- src/it/java/dev/jbang/it/VersionIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/it/java/dev/jbang/it/VersionIT.java b/src/it/java/dev/jbang/it/VersionIT.java index 8620ba776..4dd91dee3 100644 --- a/src/it/java/dev/jbang/it/VersionIT.java +++ b/src/it/java/dev/jbang/it/VersionIT.java @@ -20,7 +20,7 @@ public class VersionIT extends BaseIT { public void shouldVersion() { assertThat(shell("jbang version")).succeeded() .outMatches(Pattern.compile( - "(?s)\\d+\\.\\d+\\.\\d+(\\.\\d+)?" + lineSeparator())) + "(?s)\\d+\\.\\d+\\.\\d+(\\.\\d+)?(-SNAPSHOT)?" + lineSeparator())) .errEquals(""); } @@ -33,7 +33,7 @@ public void shouldVersion() { public void shouldVerboseVersion() { assertThat(shell("jbang --verbose version")).succeeded() .outMatches(Pattern.compile( - "(?s)\\d+\\.\\d+\\.\\d+(\\.\\d+)?" + lineSeparator())) + "(?s)\\d+\\.\\d+\\.\\d+(\\.\\d+)?(-SNAPSHOT)?" + lineSeparator())) .errContains("Repository"); } From 949d786aeda8394a007d8854c5c76c8925443756 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sun, 24 May 2026 01:12:54 +0200 Subject: [PATCH 06/11] fix: map arm64 to aarch64 in jbang script to match native binary naming macOS uname -m returns 'arm64' but Gradle names the binary with 'aarch64'. Merge the two cases so the script finds jbang-mac-aarch64.bin. --- src/main/scripts/jbang | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/scripts/jbang b/src/main/scripts/jbang index cad7b68ee..d68d32207 100755 --- a/src/main/scripts/jbang +++ b/src/main/scripts/jbang @@ -187,7 +187,7 @@ case "$(uname -m)" in arch=x32;; x86_64|amd64) arch=x64;; - aarch64) + aarch64|arm64) arch=aarch64;; armv7l) arch=arm;; @@ -195,8 +195,6 @@ case "$(uname -m)" in arch=ppc64le;; s390x) arch=s390x;; - arm64) - arch=arm64;; riscv64) arch=riscv64 ;; From dcac785b6b5c2e2ee0efa2b7371f77bfcfe42b71 Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sun, 24 May 2026 01:13:27 +0200 Subject: [PATCH 07/11] fix: include expected binary names in native binary not-found warnings --- src/main/scripts/jbang | 4 ++-- src/main/scripts/jbang.cmd | 2 +- src/main/scripts/jbang.ps1 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/scripts/jbang b/src/main/scripts/jbang index d68d32207..e2f4261b7 100755 --- a/src/main/scripts/jbang +++ b/src/main/scripts/jbang @@ -239,7 +239,7 @@ if [[ "$JBANG_USE_NATIVE" == "true" ]]; then elif [ -f "$abs_jbang_dir/jbang.bin.exe" ] && [ -x "$abs_jbang_dir/jbang.bin.exe" ]; then binaryPath="$abs_jbang_dir/jbang.bin.exe" else - echo "WARNING: JBang native binary not found in $abs_jbang_dir" 1>&2 + echo "WARNING: JBang native binary (jbang-${os}-${arch}.bin.exe or jbang.bin.exe) not found in $abs_jbang_dir" 1>&2 fi else if [ -f "$abs_jbang_dir/jbang-${os}-${arch}.bin" ] && [ -x "$abs_jbang_dir/jbang-${os}-${arch}.bin" ]; then @@ -247,7 +247,7 @@ if [[ "$JBANG_USE_NATIVE" == "true" ]]; then elif [ -f "$abs_jbang_dir/jbang.bin" ] && [ -x "$abs_jbang_dir/jbang.bin" ]; then binaryPath="$abs_jbang_dir/jbang.bin" else - echo "WARNING: JBang native binary not found or not executable in $abs_jbang_dir" 1>&2 + echo "WARNING: JBang native binary (jbang-${os}-${arch}.bin or jbang.bin) not found or not executable in $abs_jbang_dir" 1>&2 fi fi fi diff --git a/src/main/scripts/jbang.cmd b/src/main/scripts/jbang.cmd index cc1103f0c..d5ff4bd55 100644 --- a/src/main/scripts/jbang.cmd +++ b/src/main/scripts/jbang.cmd @@ -22,7 +22,7 @@ if "%JBANG_USE_NATIVE%"=="true" ( ) else if exist "%~dp0jbang.bin.exe" ( set binaryPath=%~dp0jbang.bin.exe ) else ( - echo WARNING: JBang native binary not found in %~dp0 1>&2 + echo WARNING: JBang native binary (jbang-windows-%jbang_arch%.bin.exe or jbang.bin.exe^) not found in %~dp0 1>&2 ) ) if "!binaryPath!"=="" ( diff --git a/src/main/scripts/jbang.ps1 b/src/main/scripts/jbang.ps1 index bbc8562f6..6c4beb992 100644 --- a/src/main/scripts/jbang.ps1 +++ b/src/main/scripts/jbang.ps1 @@ -130,7 +130,7 @@ if ($env:JBANG_USE_NATIVE -eq "true") { } elseif (Test-Path "$PSScriptRoot\jbang.bin.exe") { $binaryPath="$PSScriptRoot\jbang.bin.exe" } else { - [Console]::Error.WriteLine("WARNING: JBang native binary not found in $PSScriptRoot") + [Console]::Error.WriteLine("WARNING: JBang native binary (jbang-windows-${jbang_arch}.bin.exe or jbang.bin.exe) not found in $PSScriptRoot") } } if (-not $binaryPath) { From 4492ad83420a0220152bedb7575643e7d39c2f9b Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sun, 24 May 2026 01:35:43 +0200 Subject: [PATCH 08/11] fix: disable signing in jreleaser dry-run to avoid keyring init failure --- .github/workflows/step-ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/step-ci-build.yml b/.github/workflows/step-ci-build.yml index f160be69e..2e137fa88 100644 --- a/.github/workflows/step-ci-build.yml +++ b/.github/workflows/step-ci-build.yml @@ -344,7 +344,7 @@ jobs: JRELEASER_MAVENCENTRAL_JBANG_PASSWORD: unused-dry-run with: version: ${{ env.JRELEASER_VERSION }} - arguments: release --dry-run + arguments: release --dry-run -Dsigning.active=NEVER setup-java: false - name: Upload release artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 From f9ba10a035ec141bf7b660f36fa5b8eb54d71bfb Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Sun, 24 May 2026 07:14:37 +0200 Subject: [PATCH 09/11] fix: correct jreleaser signing property prefix --- .github/workflows/step-ci-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/step-ci-build.yml b/.github/workflows/step-ci-build.yml index 2e137fa88..01cbc9070 100644 --- a/.github/workflows/step-ci-build.yml +++ b/.github/workflows/step-ci-build.yml @@ -344,7 +344,7 @@ jobs: JRELEASER_MAVENCENTRAL_JBANG_PASSWORD: unused-dry-run with: version: ${{ env.JRELEASER_VERSION }} - arguments: release --dry-run -Dsigning.active=NEVER + arguments: release --dry-run -Djreleaser.signing.active=NEVER setup-java: false - name: Upload release artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 From 9266ad4fdf28d9f20217b02b1d30274f20ca8edf Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Mon, 25 May 2026 13:32:37 +0200 Subject: [PATCH 10/11] build: use jreleaser early-access to fix signing issue --- .github/workflows/main-build.yml | 2 +- .github/workflows/publish-packages.yml | 2 +- .github/workflows/step-ci-build.yml | 2 +- .github/workflows/tag-and-release.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main-build.yml b/.github/workflows/main-build.yml index 27e71da7e..6c36c152d 100644 --- a/.github/workflows/main-build.yml +++ b/.github/workflows/main-build.yml @@ -21,7 +21,7 @@ jobs: needs: ci-build runs-on: ubuntu-latest env: - JRELEASER_VERSION: 1.24.0 + JRELEASER_VERSION: early-access steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 99a05a2f4..44cdc9a8a 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -25,7 +25,7 @@ jobs: JRELEASER_MAVENCENTRAL_JBANG_USERNAME: ${{ secrets.OSSRH_USERNAME }} JRELEASER_MAVENCENTRAL_JBANG_PASSWORD: ${{ secrets.OSSRH_TOKEN }} JRELEASER_DOCKER_DEFAULT_PASSWORD: notusedbutrequiredbyjreleaser - JRELEASER_VERSION: 1.19.0 + JRELEASER_VERSION: early-access steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: diff --git a/.github/workflows/step-ci-build.yml b/.github/workflows/step-ci-build.yml index 01cbc9070..d5e0373b8 100644 --- a/.github/workflows/step-ci-build.yml +++ b/.github/workflows/step-ci-build.yml @@ -307,7 +307,7 @@ jobs: if: always() && needs.build-shared.result == 'success' && !inputs.skip_jreleaser_dry_run runs-on: ubuntu-latest env: - JRELEASER_VERSION: 1.24.0 + JRELEASER_VERSION: early-access steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index 86cf9c2f4..5b61d3f16 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -141,7 +141,7 @@ jobs: JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} JRELEASER_MAVENCENTRAL_JBANG_USERNAME: ${{ secrets.OSSRH_USERNAME }} JRELEASER_MAVENCENTRAL_JBANG_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - JRELEASER_VERSION: 1.24.0 + JRELEASER_VERSION: early-access steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: From 4f0fe6e829f2d50dc6e0fb53aafdd22b5269ae0f Mon Sep 17 00:00:00 2001 From: Max Rydahl Andersen Date: Mon, 25 May 2026 14:44:19 +0200 Subject: [PATCH 11/11] fix: use --yolo for jreleaser dry-run instead of manual signing overrides --- .github/workflows/step-ci-build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/step-ci-build.yml b/.github/workflows/step-ci-build.yml index d5e0373b8..86bc397ad 100644 --- a/.github/workflows/step-ci-build.yml +++ b/.github/workflows/step-ci-build.yml @@ -337,14 +337,9 @@ jobs: env: JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.RELEASE_VERSION }} JRELEASER_GITHUB_TOKEN: unused-dry-run - JRELEASER_GPG_PASSPHRASE: unused-dry-run - JRELEASER_GPG_PUBLIC_KEY: unused-dry-run - JRELEASER_GPG_SECRET_KEY: unused-dry-run - JRELEASER_MAVENCENTRAL_JBANG_USERNAME: unused-dry-run - JRELEASER_MAVENCENTRAL_JBANG_PASSWORD: unused-dry-run with: version: ${{ env.JRELEASER_VERSION }} - arguments: release --dry-run -Djreleaser.signing.active=NEVER + arguments: release --dry-run --yolo setup-java: false - name: Upload release artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7