diff --git a/.github/workflows/maven.yml b/.github/workflows/ci.yml similarity index 56% rename from .github/workflows/maven.yml rename to .github/workflows/ci.yml index 5f7d4d3..e3b8da3 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,3 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - name: Java CI on: @@ -28,8 +20,9 @@ jobs: java-version: '17' distribution: 'temurin' cache: maven + server-id: 'central' - name: Build with Maven - run: ./mvnw -V -B verify + run: ./mvnw -B verify # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - name: Update dependency graph diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c7f7650 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Release + +on: + workflow_dispatch: + +permissions: + contents: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + server-id: 'central' + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Perform Release + run: ./mvnw -B -Prelease -Dgpg.signer=bc release:prepare release:perform + env: + MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} + MAVEN_GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9376596..31766ae 100644 --- a/pom.xml +++ b/pom.xml @@ -6,17 +6,59 @@ io.github.shitikanth enforcer-rules - 1.0-SNAPSHOT + 1.0.0-SNAPSHOT + + Maven Enforcer Rule to ban empty java source files + https://github.com/shitikanth/enforcer-rules + + + + The Apache Software License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + Shitikanth Kashyap + shitikanth1@gmail.com + + + + + scm:git:https://github.com/shitikanth/enforcer-rules.git + scm:git:ssh://git@github.com/shitikanth/enforcer-rules.git + HEAD + https://github.com/shitikanth/enforcer-rules/tree/main + 17 17 UTF-8 3.8.1 + + 3.4.0 + 3.13.0 + 3.1.3 3.5.0 - 3.25.3 + 3.2.6 + 3.1.3 3.8.0 + 3.4.2 + 3.8.0 + 3.3.1 + 3.20.0 + 2.4 + 3.2.2 + 0.6.0 + + 4.13.0 + 3.25.3 + 5.11.0 + 1.5.7 @@ -46,23 +88,91 @@ org.junit.jupiter junit-jupiter - 5.11.0 + ${junit-jupiter.version} test ch.qos.logback logback-classic - 1.5.7 + ${logback-classic.version} test + + + + org.apache.maven.plugins + maven-source-plugin + ${maven-source-plugin.version} + + + org.apache.maven.plugins + maven-javadoc-plugin + ${maven-javadoc-plugin.version} + + + org.apache.maven.plugins + maven-enforcer-plugin + ${maven-enforcer-plugin.version} + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-clean-plugin + ${maven-clean-plugin.version} + + + org.apache.maven.plugins + maven-deploy-plugin + ${maven-deploy-plugin.version} + + + org.apache.maven.plugins + maven-gpg-plugin + ${maven-gpg-plugin.version} + + + org.apache.maven.plugins + maven-install-plugin + ${maven-install-plugin.version} + + + org.apache.maven.plugins + maven-jar-plugin + ${maven-jar-plugin.version} + + + org.apache.maven.plugins + maven-resources-plugin + ${maven-resources-plugin.version} + + + org.apache.maven.plugins + maven-site-plugin + ${maven-site-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.sonatype.central + central-publishing-maven-plugin + ${central-publishing-maven-plugin.version} + + + org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 enforce-maven-version @@ -131,6 +241,57 @@ + + release + + + + org.sonatype.central + central-publishing-maven-plugin + true + + central + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + + - - \ No newline at end of file +