From 76b1000baa46e6d4bde3008bc8ab66b971165a7e Mon Sep 17 00:00:00 2001 From: Satyaki Ghosh Date: Thu, 16 Jul 2026 13:01:19 -0400 Subject: [PATCH] update release flow --- .github/workflows/release.yml | 4 +++- src/bindings-jvm/build.sh | 17 +++-------------- .../generate-version-properties.sh | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 15 deletions(-) create mode 100755 src/bindings-jvm/generate-version-properties.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05cc8b4..17c3471 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: ref: ${{ inputs.commit || 'main' }} version-and-tag: - needs: [ get-configs, validate ] + needs: [ get-configs ] runs-on: ubuntu-latest permissions: contents: write @@ -330,8 +330,10 @@ jobs: env: ORG_GRADLE_PROJECT_signingKey: ${{ steps.signing-secrets.outputs.signing_key }} ORG_GRADLE_PROJECT_signingPassword: ${{ steps.signing-secrets.outputs.signing_password }} + RELEASE_TAG: ${{ inputs.tag }} run: | set -euo pipefail + ./generate-version-properties.sh "$RELEASE_TAG" gradle --no-daemon --console=plain centralBundle ls -lh build/central/ diff --git a/src/bindings-jvm/build.sh b/src/bindings-jvm/build.sh index 6a48163..7d20996 100755 --- a/src/bindings-jvm/build.sh +++ b/src/bindings-jvm/build.sh @@ -15,9 +15,6 @@ GENERATED_DIR="$SCRIPT_DIR/generated" RELEASE_DIR="$WORKSPACE/target/release" KOTLIN_SRC="$SCRIPT_DIR/src/main/kotlin" -JNA_VERSION="5.19.1" -GSON_VERSION="2.14.0" - ARCH="$(uname -m)" # Normalize to JNA's resource-prefix arch tokens (its canonical form) case "$ARCH" in @@ -94,17 +91,9 @@ mkdir -p "$NATIVES_DIR" cp "$RELEASE_DIR/$LIB_NAME" "$NATIVES_DIR/" # ── Generate version.properties ──────────────────────────────────────────────── -# Cargo.toml is the single source of truth for the version; JNA/Gson versions are -# owned here. The Gradle build reads these (build.gradle.kts) for the coordinates and -# POM dependency versions, so nothing is hardcoded and versions cannot drift. -VERSION=$(grep '^version' "$WORKSPACE/Cargo.toml" | head -1 | sed 's/.*"\(.*\)".*/\1/') -echo "Generating version.properties (version ${VERSION})..." -cat > "$SCRIPT_DIR/version.properties" < "$VERSION_PROPERTIES_DIR/version.properties" <