44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Release to Maven Central
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '17'
|
|
distribution: 'temurin'
|
|
cache: 'maven'
|
|
server-id: central
|
|
server-username: MAVEN_USERNAME
|
|
server-password: MAVEN_PASSWORD
|
|
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}
|
|
gpg-passphrase: MAVEN_GPG_PASSPHRASE
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
# Deploy runs the integration tests, but only with Jackson 3
|
|
# We run Jackson 2 IT manually
|
|
- name: Jackson 2 Integration Tests
|
|
run: mvn -pl mcp-test -am -Pjackson2 test
|
|
|
|
# Deploy runs all previous maven goals, including test and verify
|
|
- name: Publish to Maven Central
|
|
run: |
|
|
mvn --batch-mode \
|
|
-Prelease \
|
|
-Pjavadoc \
|
|
clean deploy
|
|
env:
|
|
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
|
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
|
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
|