2
2
name : maven-build
3
3
on :
4
4
push :
5
- branches : ['**/** ']
5
+ branches : ['**']
6
6
pull_request :
7
7
branches : [main]
8
8
types : [opened, synchronize, reopened, ready_for_review]
9
+ workflow_dispatch :
9
10
jobs :
10
11
build :
11
12
runs-on : ubuntu-latest
@@ -20,11 +21,11 @@ jobs:
20
21
MARKDOWN2HTML_MAVEN_PLUGIN_FAIL_ON_ERROR : true
21
22
steps :
22
23
- name : 📄 Checkout the repository
23
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
24
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24
25
with :
25
26
fetch-depth : 0
26
27
- name : 🧱 Set up JDK and Maven
27
- uses : actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
28
+ uses : actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
28
29
with :
29
30
distribution : adopt
30
31
java-version : 17
37
38
run : echo "cache_key=${{ runner.os }}-mvn-${{ hashFiles('**/pom.xml') }}-${{ github.sha }}" >> $GITHUB_OUTPUT
38
39
- name : 💾 Prepare cache using cache key
39
40
id : prepare-cache
40
- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
41
+ uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
41
42
with :
42
43
path : |
43
44
/home/runner/.m2
@@ -115,14 +116,14 @@ jobs:
115
116
COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE : ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PASSPHRASE }}
116
117
steps :
117
118
- name : 🧱 Set up JDK and Maven
118
- uses : actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
119
+ uses : actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
119
120
with :
120
121
distribution : adopt
121
122
java-version : 17
122
123
gpg-private-key : ${{ secrets.COM_SONATYPE_CENTRAL_POLARION_OPENSOURCE_GPG_PRIVATE_KEY }}
123
124
- name : 💾 Restore cache using cache key
124
125
id : restore-cache
125
- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
126
+ uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
126
127
with :
127
128
path : |
128
129
/home/runner/.m2
@@ -131,7 +132,7 @@ jobs:
131
132
- name : 📦 Deploy artifacts to Maven Central
132
133
run : mvn --batch-mode deploy -P gpg-sign -P nexus-staging
133
134
134
- # Deploy release to GitHub Packages
135
+ # Deploy releases for main branch to GitHub Packages
135
136
deploy-github-packages :
136
137
needs : build
137
138
runs-on : ubuntu-latest
@@ -145,13 +146,13 @@ jobs:
145
146
GITHUB_TOKEN : ${{ github.token }}
146
147
steps :
147
148
- name : 🧱 Set up JDK and Maven
148
- uses : actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4
149
+ uses : actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
149
150
with :
150
151
distribution : adopt
151
152
java-version : 17
152
153
- name : 💾 Restore cache using cache key
153
154
id : restore-cache
154
- uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
155
+ uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
155
156
with :
156
157
path : |
157
158
/home/runner/.m2
0 commit comments