maven deployment updates #71
Workflow file for this run
This file contains hidden or 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
name: Verify java | |
on: | |
# push: | |
# branches: [ "main" ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: maven | |
- name: Setup maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.6.3 | |
- name: Build with Maven | |
run: mvn --batch-mode --file pom.xml --update-snapshots verify | |
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive | |
# - name: Update dependency graph | |
# uses: advanced-security/maven-dependency-submission-action@v5 | |
# if: github.ref == 'refs/heads/main' | |
check: | |
name: check | |
if: > | |
always() | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} | |
publishMavenCentralDryRun: | |
name: Publish to Maven Central (DryRun) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'maven' | |
server-id: central | |
server-username: ${{ secrets.OSSRH_USERNAME }} | |
server-password: ${{ secrets.OSSRH_PASSWORD }} | |
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | |
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | |
- name: Dry run deployment | |
run: mvn deploy -DdryRun=true -DskipTests -Psign-artifacts |