File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -91,18 +91,31 @@ jobs:
91
91
new_version=${{ steps.version.outputs.new_version }}
92
92
sed -i "s/$current_version/$new_version/g" ${{ inputs.working_dir }}/pom.xml
93
93
echo "Version number updated from $current_version to $new_version"
94
+ - name : Create Maven Settings
95
+ run : |
96
+ cd ./${{ inputs.working_dir }}
97
+ echo "<settings>
98
+ <servers>
99
+ <server>
100
+ <id>ossrh</id>
101
+ <username>${{ secrets.SONATYPE_REPO_USERNAME }}</username>
102
+ <password>${{ secrets.SONATYPE_REPO_TOKEN }}</password>
103
+ </server>
104
+ </servers>
105
+ </settings>
106
+ " >> settings.xml
94
107
95
108
- name : Publish
96
109
if : ${{ inputs.publish_to_maven }}
97
110
run : |
98
111
cd ./${{ inputs.working_dir }}
99
- mvn -B -Drepo.id=ossrh -Drepo.login=${{ secrets.SONATYPE_REPO_ACCOUNT }} -Drepo.pwd="${{ secrets.SONATYPE_REPO_PASSWORD }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean deploy
112
+ mvn -B -s settings.xml -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean deploy
100
113
101
114
- name : Compile
102
115
if : ${{ inputs.publish_to_maven != true }}
103
116
run : |
104
117
cd ./${{ inputs.working_dir }}
105
- mvn -B -Drepo.id=ossrh -Drepo.login=${{ secrets.SONATYPE_REPO_ACCOUNT }} -Drepo.pwd="${{ secrets.SONATYPE_REPO_PASSWORD }}" -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean compile test
118
+ mvn -B -s settings.xml -Dgpg.passphrase="${{ secrets.GPG_PASSPHRASE }}" clean compile test
106
119
107
120
- name : Commit pom.xml and version.json
108
121
if : ${{ steps.checkRelease.outputs.is_release != 'true' }}
You can’t perform that action at this time.
0 commit comments