From 8cd189200855077603c2ababc30c3603395c1ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Hompus?= Date: Tue, 3 Sep 2024 16:05:00 +0200 Subject: [PATCH 1/3] Publish test --- .github/workflows/Continuous.yml | 7 +++ .github/workflows/Release.yml | 21 +++++++++ pom.xml | 75 ++++++++++++++++++++++++++++++++ settings.xml | 9 ++++ 4 files changed, 112 insertions(+) create mode 100644 .github/workflows/Release.yml create mode 100644 settings.xml diff --git a/.github/workflows/Continuous.yml b/.github/workflows/Continuous.yml index 222c0c3..79e3d50 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 @@ -29,3 +32,7 @@ jobs: with: name: Package path: staging + - name: Publish package + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..3b7fee6 --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,21 @@ +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-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Publish package + run: mvn --batch-mode deploy + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} diff --git a/pom.xml b/pom.xml index 464977e..9e1ae8b 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 @@ -104,6 +134,51 @@ + + org.apache.maven.plugins + maven-javadoc-plugin + 3.8.0 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.3 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.central + central-publishing-maven-plugin + 0.5.0 + true + + central + + + + + + + github + GitHub Packages + https://maven.pkg.github.com/dendrodocs/java-tool + + diff --git a/settings.xml b/settings.xml new file mode 100644 index 0000000..bb5efb5 --- /dev/null +++ b/settings.xml @@ -0,0 +1,9 @@ + + + + central + >${env.MAVEN_USER} + ${env.MAVEN_PASSWORD} + + + \ No newline at end of file From 30f3db8135d6ab198bd4d4450867ccb680f52194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Hompus?= Date: Tue, 3 Sep 2024 16:11:54 +0200 Subject: [PATCH 2/3] Publish test --- .github/workflows/Continuous.yml | 7 +++++-- .github/workflows/Release.yml | 5 ++++- pom.xml | 3 +++ .../descriptions/DocumentationCommentsDescription.java | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Continuous.yml b/.github/workflows/Continuous.yml index 79e3d50..e6d3cc2 100644 --- a/.github/workflows/Continuous.yml +++ b/.github/workflows/Continuous.yml @@ -23,6 +23,8 @@ 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 - name: Report Coveralls @@ -33,6 +35,7 @@ jobs: name: Package path: staging - name: Publish package - run: mvn --batch-mode deploy + run: mvn deploy env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + 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 index 3b7fee6..3b5ec34 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -14,8 +14,11 @@ jobs: distribution: 'temurin' server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Publish package - run: mvn --batch-mode deploy + run: mvn deploy 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 9e1ae8b..64882e6 100644 --- a/pom.xml +++ b/pom.xml @@ -138,6 +138,9 @@ org.apache.maven.plugins maven-javadoc-plugin 3.8.0 + + all,-missing + attach-javadocs 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") From 8a4673da20f45575738d544a2aacf7cc516c56ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Hompus?= Date: Tue, 3 Sep 2024 16:44:32 +0200 Subject: [PATCH 3/3] Publish test --- .github/workflows/Continuous.yml | 4 ++- .github/workflows/Release.yml | 7 ++-- pom.xml | 62 ++++++++++++++++++++++++++------ settings.xml | 2 +- 4 files changed, 60 insertions(+), 15 deletions(-) diff --git a/.github/workflows/Continuous.yml b/.github/workflows/Continuous.yml index e6d3cc2..12ae4af 100644 --- a/.github/workflows/Continuous.yml +++ b/.github/workflows/Continuous.yml @@ -27,6 +27,8 @@ jobs: 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 @@ -35,7 +37,7 @@ jobs: name: Package path: staging - name: Publish package - run: mvn deploy + 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 index 3b5ec34..33bb04b 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -12,13 +12,16 @@ jobs: 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 + 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 }} + MAVEN_GPG_PASSPHRASE : ${{ secrets.MAVEN_GPG_PASSPHRASE }} diff --git a/pom.xml b/pom.xml index 64882e6..4ec33d1 100644 --- a/pom.xml +++ b/pom.xml @@ -118,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 + @@ -134,10 +154,21 @@ + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + org.apache.maven.plugins maven-javadoc-plugin - 3.8.0 all,-missing @@ -153,7 +184,6 @@ org.apache.maven.plugins maven-gpg-plugin - 3.2.3 sign-artifacts @@ -164,15 +194,7 @@ - - org.sonatype.central - central-publishing-maven-plugin - 0.5.0 - true - - central - - + @@ -184,4 +206,22 @@ 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 index bb5efb5..d139e01 100644 --- a/settings.xml +++ b/settings.xml @@ -2,7 +2,7 @@ central - >${env.MAVEN_USER} + ${env.MAVEN_USER} ${env.MAVEN_PASSWORD}