Skip to content

Commit 56d5a36

Browse files
committed
Build & deploy: add branch release/7.0.0-SNAPSHOT
1 parent 24afd81 commit 56d5a36

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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/7.0.0-SNAPSHOT' ]
77

88
jobs:
99
build-maven:

.github/workflows/deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Package/Deploy
33
on:
44
workflow_dispatch:
55
workflow_run:
6-
branches: [ master ]
6+
branches: [ 'master','release/7.0.0-SNAPSHOT' ]
77
workflows: ["Build","Release"]
88
types: [completed]
99

1010
jobs:
1111
deploy-maven:
12-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
12+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event=='push' }}
1313
runs-on: 'ubuntu-latest'
1414
steps:
1515
- name: Print github context
@@ -20,10 +20,11 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222
submodules: recursive
23+
ref: ${{ github.event.workflow_run.head_branch }}
2324
- name: Set up Java for publishing to Maven Central Repository OSS
2425
uses: actions/setup-java@v4
2526
with:
26-
java-version: '8'
27+
java-version: ${{ github.event.workflow_run.head_branch == 'release/7.0.0-SNAPSHOT' && '17' || '8'}}
2728
distribution: 'temurin'
2829
server-id: ossrh
2930
server-username: MAVEN_USERNAME

0 commit comments

Comments
 (0)