diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..26c945b --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,60 @@ +# Publishes this package when a GitHub release is created. +# https://docs.github.com/en/actions/tutorials/publish-packages/publish-java-packages-with-maven +# +# That guide's Maven Central example still points at the legacy OSSRH staging +# repository. This workflow publishes to the Central Portal instead. +# +# Repository secrets: +# CENTRAL_USERNAME, CENTRAL_TOKEN — user token from https://central.sonatype.com +# MAVEN_GPG_PRIVATE_KEY — ASCII-armored GPG private key +# MAVEN_GPG_PASSPHRASE — passphrase for that key, if it has one + +name: Publish package to the Maven Central Repository and GitHub Packages + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v6 + + - name: Set up Java for publishing to Maven Central Repository + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + server-id: central + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} + gpg-passphrase: MAVEN_GPG_PASSPHRASE + env: + MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Publish to the Maven Central Repository + run: mvn --batch-mode deploy -Pcentral + env: + MAVEN_USERNAME: ${{ secrets.CENTRAL_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} + + - name: Set up Java for publishing to GitHub Packages + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + cache: maven + + - name: Publish to GitHub Packages + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/LICENSE b/LICENSE index 335ea9d..16a9501 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2018 The Python Packaging Authority +Copyright (c) 2023 Rick W. Porter Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b43e183..77697d4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![Coverage](.github/badges/jacoco.svg) ![Branches](.github/badges/branches.svg) -Display data in a tabular form with Java +Displays List and Map data in a variety of forms. The data can be output in several different different forms: * **text** - attractive ASCII format diff --git a/pom.xml b/pom.xml index df33808..1e2ef0e 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,31 @@ 4.0.0 - rickwporter.prettytable - rickwporter-prettytable + io.github.rickwporter + prettytable jar - 1.0-SNAPSHOT + 1.0.0 rickwporter-prettytable + Displays List and Map object data in a variety of forms (e.g. text [ascii], rich [utf-8], csv, html, json) + https://github.com/rickwporter/prettytable-java + + + Rick W. Porter + rickwporter@gmail.com + rickwporter + + + + + MIT License + https://opensource.org/licenses/MIT + + + + scm:git:https://github.com/rickwporter/prettytable-java.git + scm:git:ssh://git@github.com/rickwporter/prettytable-java.git + https://github.com/rickwporter/prettytable-java + @@ -26,6 +46,13 @@ 3.6.0 8.30 + + + 3.4.0 + 3.12.0 + 3.2.8 + 3.2.0 + 0.12.0 @@ -127,7 +154,97 @@ true + + + org.apache.maven.plugins + maven-source-plugin + ${version.plugin.source} + + + attach-sources + + jar-no-fork + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + ${version.plugin.javadoc} + + none + + + + attach-javadocs + + jar + + + + + + + github + GitHub Packages + https://maven.pkg.github.com/rickwporter/prettytable-java + + + + + + + central + + + + org.apache.maven.plugins + maven-gpg-plugin + ${version.plugin.gpg} + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + ${version.plugin.deploy} + + true + + + + org.sonatype.central + central-publishing-maven-plugin + ${version.plugin.central} + true + + central + true + published + + + + + + +