Skip to content

Commit 8f78b12

Browse files
committed
Build & deploy: add branch release/5.0.0-SNAPSHOT
1 parent 512d235 commit 8f78b12

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Build
33
on:
44
push:
55
pull_request:
6-
branches: [ master ]
6+
branches: [ 'master','release/5.0.0-SNAPSHOT' ]
77

88
jobs:
99
build-maven:

.github/workflows/deploy.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Package/Deploy
22

33
on:
44
workflow_run:
5-
branches: [ master ]
6-
workflows: ["Build"]
5+
branches: [ 'master','release/5.0.0-SNAPSHOT' ]
6+
workflows: ["Build","Release"]
77
types: [completed]
88
jobs:
99
package-deploy-maven:
10-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
10+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event=='push'}}
1111
runs-on: 'ubuntu-latest'
1212
steps:
1313
- name: Print github context
@@ -31,10 +31,11 @@ jobs:
3131
with:
3232
fetch-depth: 0
3333
submodules: recursive
34+
ref: ${{ github.event.workflow_run.head_branch }}
3435
- name: Set up Java for publishing to Maven Central Repository OSS
3536
uses: actions/setup-java@v4
3637
with:
37-
java-version: '8'
38+
java-version: ${{ github.event.workflow_run.head_branch == 'release/5.0.0-SNAPSHOT' && '11' || '8'}}
3839
distribution: 'temurin'
3940
server-id: ossrh
4041
server-username: MAVEN_USERNAME

0 commit comments

Comments
 (0)