diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 5d7fc50..3608115 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -1,4 +1,4 @@ -name: Maven Package +name: Maven Release Package on: release: @@ -8,26 +8,27 @@ on: workflow_dispatch: jobs: - build: + build-and-deploy: runs-on: ubuntu-latest permissions: contents: read - packages: write steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 + + - name: Set up JDK 17 uses: actions/setup-java@v3 with: - java-version: '11' + java-version: '17' distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file + server-id: ossrh # Server ID from your settings.xml + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Imported from GitHub secrets + gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} # Imported from GitHub secrets - name: Build with Maven - run: mvn -B package -DskipTests --file pom.xml + run: mvn clean install -B -P release --file pax-sdk/pom.xml - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + - name: Sign and Deploy to OSSRH + run: mvn deploy -B -P release --settings pax-sdk/settings.xml --file pax-sdk/pom.xml env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/pax-sdk/pom.xml b/pax-sdk/pom.xml index 98900d4..033df28 100644 --- a/pax-sdk/pom.xml +++ b/pax-sdk/pom.xml @@ -3,13 +3,32 @@ 4.0.0 org.unigrid pax-sdk - 0.0.1-SNAPSHOT + 0.0.1 jar + + pax-sdk + A Java SDK to connect to the Unigrid Cosmos SDK Network + https://unigrid.org + + + + dekm + Evan Green + info@unigrid.org + + UTF-8 17 17 + + + https://github.com/unigrid-project/pax-sdk-java + scm:git:git://github.com/unigrid-project/pax-sdk-java.git + scm:git:ssh://github.com:unigrid-project/pax-sdk-java.git + + @@ -93,20 +112,15 @@ + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + - github - GitHub Apache Maven Packages - https://maven.pkg.github.com/unigrid-project/pax-sdk-java + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - github - Unigrid Cosmos SDK Java Apache Maven Packages - https://maven.pkg.github.com/unigrid-project/pax-sdk-java - - @@ -828,6 +842,44 @@ 17 + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + \ No newline at end of file diff --git a/pax-sdk/settings.xml b/pax-sdk/settings.xml new file mode 100644 index 0000000..af81f32 --- /dev/null +++ b/pax-sdk/settings.xml @@ -0,0 +1,13 @@ + + + + + + ossrh + ${env.OSSRH_USERNAME} + ${env.OSSRH_PASSWORD} + + + \ No newline at end of file