File tree Expand file tree Collapse file tree 2 files changed +49
-27
lines changed Expand file tree Collapse file tree 2 files changed +49
-27
lines changed Original file line number Diff line number Diff line change 1+ name : Prepare Release to Maven Central
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ releaseVersion :
7+ description : ' Release and tag version'
8+ required : true
9+ default : " v1.5.0-dev.N"
10+ developmentVersion :
11+ description : ' Version to use for new working copy'
12+ required : true
13+ default : ' 2.0.0-SNAPSHOT'
14+
15+ jobs :
16+ release :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v5
21+
22+ - name : Set up JDK 8
23+ uses : actions/setup-java@v5
24+ with :
25+ distribution : ' zulu'
26+ java-version : ' 8'
27+ server-id : central
28+ server-username : MAVEN_USERNAME
29+ server-password : MAVEN_TOKEN
30+
31+ - name : Configure Git user
32+ run : |
33+ git config user.email "actions@github.com"
34+ git config user.name "GitHub Actions"
35+
36+ - name : Run release release.yml
37+ env :
38+ MAVEN_USERNAME : ${{ secrets.MAVEN_CENTRAL_USER }}
39+ MAVEN_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
40+ RELEASE_VERSION : ${{ github.event.inputs.releaseVersion }}
41+ DEVELOPMENT_VERSION : ${{ github.event.inputs.developmentVersion }}
42+ run : |
43+ ./mvnw release:prepare -DskipTests -Darguments=-DskipTests \
44+ -DreleaseVersion="$RELEASE_VERSION" -Dtag="$RELEASE_VERSION" \
45+ -DdevelopmentVersion="$DEVELOPMENT_VERSION"
Original file line number Diff line number Diff line change 1- name : Release to Maven Central
1+ name : Publish Release to Maven Central
22
33on :
4- workflow_dispatch :
5- inputs :
6- releaseVersion :
7- description : ' Release and tag version'
8- required : true
9- default : " v1.5.0-dev.N"
10- developmentVersion :
11- description : ' Version to use for new working copy'
12- required : true
13- default : ' 2.0.0-SNAPSHOT'
4+ push :
5+ tags :
6+ - ' v[0-9]+.[0-9]+.[0-9]+'
147
158jobs :
169 release :
3023 gpg-private-key : ${{ secrets.MAVEN_CENTRAL_GPG_PRIVATE_KEY }}
3124 gpg-passphrase : MAVEN_GPG_PASSPHRASE
3225
33- - name : Configure Git user
34- run : |
35- git config user.email "actions@github.com"
36- git config user.name "GitHub Actions"
37-
38- - name : Run release prepare
39- env :
40- MAVEN_USERNAME : ${{ secrets.MAVEN_CENTRAL_USER }}
41- MAVEN_TOKEN : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
42- RELEASE_VERSION : ${{ github.event.inputs.releaseVersion }}
43- DEVELOPMENT_VERSION : ${{ github.event.inputs.developmentVersion }}
44- run : |
45- ./mvnw release:prepare -DskipTests -Darguments=-DskipTests \
46- -DreleaseVersion="$RELEASE_VERSION" -Dtag="$RELEASE_VERSION" \
47- -DdevelopmentVersion="$DEVELOPMENT_VERSION"
48-
4926 - name : Publish to Maven Central
5027 run : |
5128 ./mvnw -B clean deploy -PsonatypeRelease -DskipTests
You can’t perform that action at this time.
0 commit comments