File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Release new version
2+
3+ on :
4+ workflow_dispatch
5+
6+ jobs :
7+ deploy :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v4
11+ - name : Set up JDK
12+ uses : actions/setup-java@v4
13+ with :
14+ distribution : ' temurin'
15+ java-version : ' 17'
16+ cache : maven
17+ server-id : central # Value of the distributionManagement/repository/id field of the pom.xml
18+ server-username : SONATYPE_USERNAME
19+ server-password : SONATYPE_PASSWORD
20+ gpg-private-key : ${{ secrets.GPG_PRIVATE_KEY }} # has to be read directly from secrets
21+ gpg-passphrase : MAVEN_GPG_PASSPHRASE # default name used by maven-gpg-plugin
22+
23+ - name : Setup git profile
24+ run : |
25+ git config --global user.name "github-actions[bot]"
26+ git config --global user.email "123456+github-actions[bot]@users.noreply.github.com"
27+
28+ - name : Release new version
29+ run :
30+ mvn -B release:clean release:prepare release:perform -P release
31+ env :
32+ SONATYPE_USERNAME : ${{ secrets.SONATYPE_USERNAME }}
33+ SONATYPE_PASSWORD : ${{ secrets.SONATYPE_PASSWORD }}
34+ MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
You can’t perform that action at this time.
0 commit comments