Skip to content

Update maven-publish.yml #2

Update maven-publish.yml

Update maven-publish.yml #2

name: Deploy Snapshot
on:
push:
branches:
- 'master'
jobs:
deploy:
name: Deploy Snapshot
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: 'master'
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'zulu'
server-id: sonatype-nexus-snapshots
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
- name: Deploy to Maven Central
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USER }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_PASSWORD }}
run: xvfb-run mvn -B deploy