File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed
Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change 66 - main
77 workflow_dispatch :
88 inputs :
9+ version :
10+ description : ' Version number (e.g. 2.0.8) - leave empty to use branch/tag name'
11+ required : false
12+ type : string
13+ default : ' '
914 publish_maven :
1015 description : ' Publish to Maven'
1116 required : false
@@ -58,10 +63,19 @@ jobs:
5863 distribution : ' temurin'
5964 cache : ' maven'
6065
66+ - name : Determine version
67+ id : version
68+ run : |
69+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.version }}" ]; then
70+ echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
71+ else
72+ echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
73+ fi
74+
6175 - name : Publish Javadocs
6276 env :
6377 GITHUB_REPO_SLUG : ${{ github.repository }}
64- GITHUB_TAG : ${{ github.ref_name }}
78+ GITHUB_TAG : ${{ steps.version.outputs.version }}
6579 run : |
6680 main/build/publishJavadoc-gha.sh
6781
@@ -93,8 +107,17 @@ jobs:
93107 gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }}
94108 gpg-passphrase : ${{ secrets.GPG_PASSPHRASE }}
95109
110+ - name : Determine version
111+ id : version
112+ run : |
113+ if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ inputs.version }}" ]; then
114+ echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
115+ else
116+ echo "version=${{ github.ref_name }}" >> $GITHUB_OUTPUT
117+ fi
118+
96119 - name : Set Maven version
97- run : mvn versions:set -DnewVersion=${{ github.ref_name }} -DgenerateBackupPoms=false
120+ run : mvn versions:set -DnewVersion=${{ steps.version.outputs.version }} -DgenerateBackupPoms=false
98121
99122 - name : Deploy to Maven Central
100123 env :
You can’t perform that action at this time.
0 commit comments