@@ -5,6 +5,10 @@ name: Release
55on :
66 workflow_dispatch :
77 inputs :
8+ dsl_version :
9+ description : " DSL version for release tag and build (e.g. 9.5.0). Leave empty to use pom.xml value."
10+ type : string
11+ required : false
812 dry_run :
913 description : " DRY RUN: Do not push/tag or create a GitHub Release"
1014 type : boolean
4852 shell : bash
4953 run : |
5054 set -euo pipefail
51- DSL_VERSION=$(mvn -q help:evaluate -Dexpression=rosetta.dsl.version -DforceStdout)
55+ if [ -n "${{ github.event.inputs.dsl_version }}" ]; then
56+ DSL_VERSION="${{ github.event.inputs.dsl_version }}"
57+ if ! [[ "$DSL_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
58+ echo "Invalid dsl_version '$DSL_VERSION': must be in a.b.c format (e.g. 9.5.0)"
59+ exit 1
60+ fi
61+ echo "Using provided DSL version override: $DSL_VERSION"
62+ else
63+ DSL_VERSION=$(mvn -q help:evaluate -Dexpression=rosetta.dsl.version -DforceStdout)
64+ fi
5265 if [ -z "${DSL_VERSION:-}" ]; then
53- echo "Failed to resolve rosetta.dsl.version from pom.xml "
66+ echo "Failed to resolve rosetta.dsl.version"
5467 exit 1
5568 fi
5669 echo "dsl_version=$DSL_VERSION" >> "$GITHUB_OUTPUT"
@@ -155,17 +168,30 @@ jobs:
155168 java-version : 21
156169 cache : maven
157170
158- - name : Set project version for build (ephemeral)
171+ - name : Build JARs
172+ shell : bash
173+ run : mvn -B clean package -Drosetta.dsl.version="${{ needs.prepare-release.outputs.dsl_version }}"
174+
175+ - name : Set up Python
176+ uses : actions/setup-python@v6
177+ with :
178+ python-version : ' 3.11'
179+ cache : pip
180+
181+ - name : Run Python unit tests
182+ shell : bash
183+ run : |
184+ set -e
185+ python-test/unit-tests/run_python_unit_tests.sh
186+
187+ - name : Set project version and repackage for release (ephemeral)
159188 env :
160189 TAG_NAME : ${{ needs.prepare-release.outputs.tag_name }}
161190 shell : bash
162191 run : |
163192 set -euo pipefail
164193 mvn -q -B versions:set -DnewVersion="${TAG_NAME}" -DgenerateBackupPoms=false
165-
166- - name : Build JARs
167- shell : bash
168- run : mvn -B clean package
194+ mvn -B package -DskipTests -Drosetta.dsl.version="${{ needs.prepare-release.outputs.dsl_version }}"
169195
170196 - name : Collect artifact paths
171197 id : archive
0 commit comments