diff --git a/.github/workflows/Continuous.yml b/.github/workflows/Continuous.yml index 222c0c3..12ae4af 100644 --- a/.github/workflows/Continuous.yml +++ b/.github/workflows/Continuous.yml @@ -12,6 +12,9 @@ jobs: ubuntu-latest: name: ubuntu-latest runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - uses: actions/checkout@v4 - name: Set up JDK 21 @@ -20,8 +23,12 @@ jobs: java-version: '21' distribution: 'temurin' cache: maven + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Run the Maven verify phase run: mvn verify jacoco:report -e --update-snapshots --no-transfer-progress + env: + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - name: Report Coveralls uses: coverallsapp/github-action@v2 - run: mkdir staging && cp target/*.jar staging @@ -29,3 +36,8 @@ jobs: with: name: Package path: staging + - name: Publish package + run: mvn deploy --no-transfer-progress -DskipPublishing + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} \ No newline at end of file diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..33bb04b --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,27 @@ +name: Publish package to the Maven Central Repository +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Maven Central Repository + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' + server-id: 'central' + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Update version in pom.xml + run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false + - name: Publish package + run: mvn deploy -P publish --no-transfer-progress + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} + MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/pom.xml b/pom.xml index 464977e..4ec33d1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,36 @@ tool 0.1.0-SNAPSHOT + DendroDocs Tool + Tool to analyze a solution and output the detected code structure to enable rendering. + https://github.com/dendrodocs/java-tool + + + + MIT License + https://opensource.org/license/mit + + + + + DendroDocs + https://github.com/dendrodocs + + + + + mhompus + Michaƫl Hompus + michael@hompus.nl + + + + + scm:git:git://github.com/dendrodocs/java-tool.git + scm:git:ssh://github.com:dendrodocs/java-tool.git + https://github.com/dendrodocs/java-tool/tree/master + + 21 21 @@ -88,6 +118,26 @@ jacoco-maven-plugin 0.8.12 + + org.apache.maven.plugins + maven-javadoc-plugin + 3.8.0 + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.3 + + + org.sonatype.central + central-publishing-maven-plugin + 0.5.0 + @@ -104,6 +154,74 @@ + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + + all,-missing + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + + + + + github + GitHub Packages + https://maven.pkg.github.com/dendrodocs/java-tool + + + + + + publish + + + + org.sonatype.central + central-publishing-maven-plugin + true + + central + + + + + + diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..d139e01 --- /dev/null +++ b/settings.xml @@ -0,0 +1,9 @@ + + + + central + ${env.MAVEN_USER} + ${env.MAVEN_PASSWORD} + + + \ No newline at end of file diff --git a/src/main/java/dev/dendrodocs/tool/descriptions/DocumentationCommentsDescription.java b/src/main/java/dev/dendrodocs/tool/descriptions/DocumentationCommentsDescription.java index 1d60038..5691ff2 100644 --- a/src/main/java/dev/dendrodocs/tool/descriptions/DocumentationCommentsDescription.java +++ b/src/main/java/dev/dendrodocs/tool/descriptions/DocumentationCommentsDescription.java @@ -13,7 +13,7 @@ * @param summary The second sentence of the JavaDoc comment? * @param params A mapping of parameter names to their text, from the '@param' tags. * @param typeParams A mapping of type parameter names to their text, from the '@param' tags that - * start with '<'someType'>'. + * start with '<'someType'>'. */ public record DocumentationCommentsDescription( @JsonProperty("Remarks")