diff --git a/.github/workflows/depoly.yml b/.github/workflows/depoly.yml new file mode 100644 index 0000000..8281c92 --- /dev/null +++ b/.github/workflows/depoly.yml @@ -0,0 +1,38 @@ +name: Maven Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '17' + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Set up Apache Maven Central + uses: actions/setup-java@v4 + with: # running setup-java again overwrites the settings.xml + distribution: 'temurin' + java-version: '17' + server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml + server-username: MAVEN_USERNAME # env variable for username in deploy + server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import + gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase + + - name: Publish to Apache Maven Central + run: mvn deploy -Prelease + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} \ No newline at end of file diff --git a/mybatis-plus-join-test/pom.xml b/mybatis-plus-join-test/pom.xml index 3252b2b..c2a2adf 100644 --- a/mybatis-plus-join-test/pom.xml +++ b/mybatis-plus-join-test/pom.xml @@ -102,6 +102,20 @@ + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + org.codehaus.mojo flatten-maven-plugin diff --git a/pom.xml b/pom.xml index a80b187..0167326 100644 --- a/pom.xml +++ b/pom.xml @@ -86,6 +86,85 @@ + + + release + + + + org.sonatype.plugins + nexus-staging-maven-plugin + true + + maven + https://oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + -Xdoclint:none + + UTF-8 + UTF-8 + UTF-8 + + + + org.apache.maven.plugins + maven-gpg-plugin + + + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + + + + maven + https://oss.sonatype.org/content/repositories/snapshots + + + maven + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + +