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 3
3
push :
4
4
branches :
5
5
- main
6
- # - r[0-9]+.*
6
+ - r[0-9]+.*
7
7
pull_request :
8
8
branches :
9
9
- main
10
- # - r[0-9]+.*
10
+ - r[0-9]+.*
11
11
types : [opened, reopened, synchronize]
12
12
jobs :
13
13
build :
30
30
run : |
31
31
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
32
32
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 1
1
#! /usr/bin/env bash
2
- # Copyright 2023 The TensorFlow Authors. All Rights Reserved.
2
+ # Copyright 2024 The TensorFlow Authors. All Rights Reserved.
3
3
#
4
4
# Licensed under the Apache License, Version 2.0 (the "License");
5
5
# you may not use this file except in compliance with the License.
15
15
# ==============================================================================
16
16
#
17
17
# 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.
19
19
20
20
cd $( dirname " $0 " )
21
21
shift
22
22
shift
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
23
32
24
33
export GPG_TTY=$( tty)
25
34
set -ex
26
35
36
+ if [[ ! -f settings.xml ]]
37
+ then
38
+ cp -f ~ /.m2/settings.xml .
39
+ fi
40
+
27
41
docker run \
28
42
-e GPG_TTY=" ${GPG_TTY} " \
29
43
-v ${PWD} :/tensorflow-java-ndarray \
30
44
-v ${HOME} /.gnupg:/root/.gnupg \
31
45
-w /tensorflow-java-ndarray \
32
46
-it \
47
+ --platform linux/amd64 \
33
48
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