diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b5e9a0e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy to Maven Central + +on: [release] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + + - name: Set up JDK + uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520 # v5.4.0 + with: + distribution: temurin + java-version: 8 + server-id: central + server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + server-password: ${{ secrets.MAVEN_CENTRAL_TOKEN }} + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Publish to Apache Maven Central + run: ./mvnw deploy -DperformRelease=true + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ca3336..5188d33 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,4 +21,4 @@ jobs: java-version: ${{ matrix.java }} cache: 'maven' - name: Test with Maven - run: mvn verify -B --file pom.xml + run: ./mvnw test -B --file pom.xml diff --git a/pom.xml b/pom.xml index e172fb7..fad2876 100644 --- a/pom.xml +++ b/pom.xml @@ -164,6 +164,16 @@ loopback + + + + sign-artifacts + verify + + sign + + + @@ -229,34 +239,4 @@ - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - - - - sign-artifacts - verify - - sign - - - - - - - -