File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -61,12 +61,12 @@ jobs:
6161 - name : Publish to Maven Central
6262 env :
6363 # TRAVIS_TAG: ${{ github.event.release.tag_name }} # for setMavenVersion
64- TRAVIS_TAG : ${GITHUB_REF##*/} # for setMavenVersion
64+ GHA_TAG : ${{ github.ref }} # non PR only need to get last part
6565 OSSRH_USERNAME : ${{ secrets.OSSRH_USERNAME }} # for .travis.settings.xml
6666 OSSRH_PASSWORD : ${{ secrets.OSSRH_USERNAME }}
6767 run : |
6868 build/setupSigning.sh
69- build/setMavenVersion .sh
69+ build/setMavenVersion_gha .sh
7070 mvn deploy --settings build/.travis.settings.xml -DskipITs -Dskip.unit.tests -P central $MVN_ARGS
7171
7272 - name : Publish Java docs
7979 GHA_BUILD_NUMBER : ${{ github.run_number }}
8080 GHA_JOB_NUMBER : ${{ github.job_number }}
8181 GHA_COMMIT : ${{ github.sha }}
82- GHA_TAG : ${{ github.event.release.tag_name }}
83- TRAVIS_TAG : ${{ github.event.release.tag_name }} # for setMavenVersion
82+ GHA_TAG : ${{ github.ref }} # for setMavenVersion_gha
8483 run : |
85- build/setMavenVersion .sh
84+ build/setMavenVersion_gha .sh
8685 mvn clean javadoc:aggregate $MVN_ARGS
8786 build/publish_gha.sh
Original file line number Diff line number Diff line change 22
33# This script will check $TRAVIS_TAG to see if we need to run maven to
44# set the artifact version #'s.
5- printf " \n>>>>> WWW Setting artifact version #'s to: %s\n" ${TRAVIS_TAG: 1}
65
76if [[ -n " ${TRAVIS_TAG} " ]]; then
87 printf " \n>>>>> Setting artifact version #'s to: %s\n" ${TRAVIS_TAG: 1}
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script will check $GHA_TAG to see if we need to run maven to
4+ # set the artifact version #'s.
5+ export GHA_TAG=${GHA_TAG##*/ } # Get the last part for true tag name - "refs/heads/9260_gha"
6+
7+ if [[ -n " ${GHA_TAG} " ]]; then
8+ printf " \n>>>>> Setting artifact version #'s to: %s\n" ${GHA_TAG: 1}
9+ mvn versions:set -DnewVersion=${GHA_TAG: 1} -DgenerateBackupPoms=false
10+ else
11+ printf " \n>>>>> Bypassing artifact version setting for non-tagged build %s\n" ${GHA_TAG: 1}
12+ fi
13+
You can’t perform that action at this time.
0 commit comments