5
5
types : [closed]
6
6
paths :
7
7
- ' .github/project.yml'
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress : true
11
+
12
+ defaults :
13
+ run :
14
+ shell : bash
8
15
9
16
jobs :
10
17
release :
@@ -34,14 +41,10 @@ jobs:
34
41
with :
35
42
distribution : temurin
36
43
java-version : 11
37
-
38
- - name : Cache local Maven repository
39
- uses : actions/cache@v3
40
- with :
41
- path : ~/.m2/repository
42
- key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
43
- restore-keys : |
44
- ${{ runner.os }}-maven-
44
+ cache : ' maven'
45
+ server-id : ossrh
46
+ server-username : MAVEN_USERNAME
47
+ server-password : MAVEN_PASSWORD
45
48
46
49
- name : Configure Git author
47
50
run : |
@@ -50,22 +53,13 @@ jobs:
50
53
51
54
- name : Maven release ${{steps.metadata.outputs.current-version}}
52
55
run : |
53
- gpg --quiet --batch --yes --decrypt --passphrase="${{secrets.GPG_PASSPHRASE}}" --output /tmp/maven-settings.xml .github/release/maven-settings.xml.gpg
54
- git checkout -b release
55
- mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}} -s /tmp/maven-settings.xml
56
- git checkout ${{github.base_ref}}
57
- git rebase release
58
- mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease -s /tmp/maven-settings.xml
56
+ mvn -B release:prepare -Prelease -DreleaseVersion=${{steps.metadata.outputs.current-version}} -DdevelopmentVersion=${{steps.metadata.outputs.next-version}}
57
+ mvn -B release:perform -Darguments=-DperformRelease -DperformRelease -Prelease
58
+ env :
59
+ MAVEN_USERNAME : ${{ secrets.OSSRH_USERNAME }}
60
+ MAVEN_PASSWORD : ${{ secrets.OSSRH_TOKEN }}
59
61
60
- - name : Push changes to ${{github.base_ref}}
61
-
62
- with :
63
- github_token : ${{ secrets.GITHUB_TOKEN }}
64
- branch : ${{github.base_ref}}
65
-
66
- - name : Push tags
67
-
68
- with :
69
- github_token : ${{ secrets.GITHUB_TOKEN }}
70
- tags : true
71
- branch : ${{github.base_ref}}
62
+ - name : Push changes to ${{github.base_ref}} branch
63
+ run : |
64
+ git push
65
+ git push origin ${{steps.metadata.outputs.current-version}}
0 commit comments