This repository was archived by the owner on Jul 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +23
-11
lines changed
Expand file tree Collapse file tree 2 files changed +23
-11
lines changed Original file line number Diff line number Diff line change 33 push :
44 branches :
55 - main
6- # - r[0-9]+.*
6+ - r[0-9]+.*
77 pull_request :
88 branches :
99 - main
10- # - r[0-9]+.*
10+ - r[0-9]+.*
1111 types : [opened, reopened, synchronize]
1212jobs :
1313 build :
3030 run : |
3131 echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
3232 mvn deploy -B -U -e -Dmaven.test.skip=true
33- - name : Release artifacts
34- if : github.event_name == 'push' && startsWith(github.ref, 'r')
35- run : |
36- echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
37- mvn release:prepare -B -U -e
38- mvn release:perform -B -U -e -Dmaven.test.skip=true
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
2- # Copyright 2023 The TensorFlow Authors. All Rights Reserved.
2+ # Copyright 2024 The TensorFlow Authors. All Rights Reserved.
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
1515# ==============================================================================
1616#
1717# Script to upload release artifacts for the TensorFlow Java library to
18- # Maven Central. See RELEASE.md for an explanation.
18+ # Maven Central. See RELEASE.md for explanation.
1919
2020cd $( dirname " $0 " )
2121shift
2222shift
23+ CMD=" $* "
24+
25+ # If release fails, debug with
26+ # ./release.sh bash
27+ # To get a shell to poke around the maven artifacts with.
28+ if [[ -z " ${CMD} " ]]
29+ then
30+ CMD=" mvn clean deploy -B -e --settings ./settings.xml -Pdeploying -Preleasing"
31+ fi
2332
2433export GPG_TTY=$( tty)
2534set -ex
2635
36+ if [[ ! -f settings.xml ]]
37+ then
38+ cp -f ~ /.m2/settings.xml .
39+ fi
40+
2741docker run \
2842 -e GPG_TTY=" ${GPG_TTY} " \
2943 -v ${PWD} :/tensorflow-java-ndarray \
3044 -v ${HOME} /.gnupg:/root/.gnupg \
3145 -w /tensorflow-java-ndarray \
3246 -it \
47+ --platform linux/amd64 \
3348 maven:3.8.6-jdk-11 \
34- mvn --settings settings.xml -Preleasing clean deploy -B -U -e
49+ ${CMD}
50+
51+ echo
52+ echo " Release completed"
You can’t perform that action at this time.
0 commit comments