-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github workflow yaml to publish package to the Maven Central Repository
- Loading branch information
1 parent
453b775
commit 95dbd66
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# The name of workflow. GitHub displays the names on repository's actions page. | ||
# If omitted, GitHub sets it to the workflow file path relative to the root of the repository. | ||
# see: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions | ||
name: Publish package to the Maven Central Repository | ||
|
||
# Triggered when code is pushed to any branch in a repository | ||
#on: push | ||
# Triggers the workflow on push or pull request events | ||
#on: [push, pull_request] | ||
# Triggers on event release with type created | ||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
# continue-on-error: ${{ matrix.experimental }} | ||
# strategy: | ||
# matrix: | ||
# java: [ 8, 11, 16 ] | ||
# experimental: [false] | ||
# include: | ||
# - java: 17-ea | ||
# experimental: true | ||
strategy: | ||
matrix: | ||
java: [ 16 ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '16' | ||
distribution: 'adopt' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: Publish package | ||
# run: mvn -V --batch-mode -Ddoclint=all --file pom.xml --no-transfer-progress deploy | ||
run: mvn -V --batch-mode deploy | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters