Skip to content

Commit 05202d9

Browse files
committed
Fixing CI build
1 parent 145062f commit 05202d9

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ on:
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]
1212
jobs:
1313
build:
@@ -30,9 +30,3 @@ jobs:
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

release.sh

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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.
@@ -15,20 +15,38 @@
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

2020
cd $(dirname "$0")
2121
shift
2222
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
2332

2433
export GPG_TTY=$(tty)
2534
set -ex
2635

36+
if [[ ! -f settings.xml ]]
37+
then
38+
cp -f ~/.m2/settings.xml .
39+
fi
40+
2741
docker 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"

0 commit comments

Comments
 (0)