Skip to content

Commit be63cfe

Browse files
authored
Add optional mvn-options input to maven-publish workflow (#50)
1 parent e96db1f commit be63cfe

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/maven-publish.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@
1919

2020
name: Maven publish
2121

22-
on: workflow_call
22+
on:
23+
workflow_call:
24+
inputs:
25+
# calling workflow can specify inputs as follows:
26+
# uses: <this reusable workflow>
27+
# with:
28+
# mvn-options: <custom options>
29+
mvn-options:
30+
description: 'extra maven command line options (space separated)'
31+
default: ''
32+
required: false
33+
type: string
2334

2435
jobs:
2536
publish:
@@ -43,7 +54,7 @@ jobs:
4354

4455
- name: Publish to Maven Central Portal
4556
# if autoPublish is false (see pom.xml), we need to publish manually via https://central.sonatype.com/publishing/deployments
46-
run: mvn --batch-mode deploy
57+
run: mvn --batch-mode --fail-fast ${{ inputs.mvn-options }} deploy
4758
env:
4859
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
4960
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}

0 commit comments

Comments
 (0)