name: Snapshot on: push: branches: - 2022.0 - 2021.0 - 2020.0 - hoxton - greenwich jobs: snapshot: runs-on: ubuntu-latest steps: - name: Checkout codes uses: actions/checkout@v3 - name: Set up JDK 17 uses: actions/setup-java@v3 with: java-version: '17' distribution: 'temurin' server-id: nexus-snapshots server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - name: Publish package run: mvn clean deploy -B -U -Psonatype env: MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}