This is an automated email from the ASF dual-hosted git repository. xuanwo pushed a commit to branch improve-java-ci in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
commit c27ca54d99004617169a8840a914b21a1eca9cf6 Author: Xuanwo <[email protected]> AuthorDate: Thu Sep 14 00:00:07 2023 +0800 feat: Enable release when OPENDAL_RELEASE is on Signed-off-by: Xuanwo <[email protected]> --- .github/workflows/release_java.yml | 3 +++ bindings/java/tools/build.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release_java.yml b/.github/workflows/release_java.yml index 4b9223f6c..024b5eb63 100644 --- a/.github/workflows/release_java.yml +++ b/.github/workflows/release_java.yml @@ -25,6 +25,9 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+' workflow_dispatch: +env: + OPENDAL_RELEASE: on + jobs: stage-snapshot: runs-on: ${{ matrix.os }} diff --git a/bindings/java/tools/build.py b/bindings/java/tools/build.py index bae9f8b78..499f7307e 100755 --- a/bindings/java/tools/build.py +++ b/bindings/java/tools/build.py @@ -54,7 +54,11 @@ if __name__ == '__main__': parser.add_argument('--classifier', type=str, required=True) args = parser.parse_args() - cmd = ['cargo', 'build', '--color=always', '--release'] + cmd = ['cargo', 'build', '--color=always'] + + # Only enable release build while OPENDAL_RELEASE is on. + if os.environ.get('OPENDAL_RELEASE') == 'on': + cmd.append('--release') target = classifier_to_target(args.classifier) if target:
