diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7d3d992 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,34 @@ +name: Release +on: + push: + tags: + - 'v*' +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Java for publishing to Maven Central Repository + uses: actions/setup-java@v3 + with: + java-version: 8 + server-id: ossrh + distribution: "adopt" + server-username: OSSRH_USERNAME + server-password: OSSRH_PASSWORD + gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} + gpg-passphrase: GPG_PASSPHRASE + + - name: Publish to the Maven Central Repository + run: mvn -DskipTests=true --batch-mode deploy + env: + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} + OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} + + - name: Create GitHub release + uses: softprops/action-gh-release@v1 + with: + files: target/*.jar diff --git a/pom.xml b/pom.xml index bb01a08..1b66282 100644 --- a/pom.xml +++ b/pom.xml @@ -118,52 +118,45 @@ + scala-compile compile + + + + scala-test-compile + testCompile - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - sign-artifacts + prepare-release-assets - sign + add-source - verify + prepare-package - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - attach-sources + generate-doc-jar - jar-no-fork + doc-jar + package + org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 + maven-gpg-plugin + 1.6 - attach-javadocs + sign-artifacts - jar + sign + verify @@ -298,6 +291,33 @@ + + + org.apache.maven.plugins + maven-source-plugin + 3.3.0 + + + generate-source-jar + + jar-no-fork + + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ossrh + https://oss.sonatype.org/ + + false + + diff --git a/private_key.asc b/private_key.asc new file mode 100644 index 0000000..9861889 --- /dev/null +++ b/private_key.asc @@ -0,0 +1,17 @@ +-----BEGIN PGP PRIVATE KEY BLOCK----- + +lIYEYrG+GhYJKwYBBAHaRw8BAQdAyVsro1W/bO8S/DQcCZIlY/d2N8IqZLFUvIYW +44YRdx7+BwMCE0Kle/WaiJz7FIm8PpyhwHSU08Mw5uMGyFOBb9xgiVuXLwwyPa2I +F/VNZi9SUbvXB48aC4kT5w/RjwpRroMjaCljwD2Fw/eTuoJCQWX0o7QiTWlsZXMg +WXVjaHQgPG1pbGVzQGRhdGFicmlja3MuY29tPoiTBBMWCgA7FiEEuTs07YMgrzFk +QsGXEP9eWKOmkr4FAmKxvhoCGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AA +CgkQEP9eWKOmkr7vwQD+JRhNiCX9+e8+ne/TpGanT7A90t+haKHoJmP46SLZNH0A +/3axdvSIJUtH5YLro+wfTvj7ePdSqgeQFPnpLMild6IKnIsEYrG+GhIKKwYBBAGX +VQEFAQEHQAFNIj6I1As8GdUQ/HH+nC886O6Ax75B2/TX5ADMKKhYAwEIB/4HAwK0 +bJqlzjkK4fvuNBC+pcNfY4J6EeCLf/u08kesry8hPq38x7tv/7VWbadmoWxUwIkc +VNDEbxL2WpuW4hCjq+gV8IggP7LxJa4/AKKw7hxCiHgEGBYKACAWIQS5OzTtgyCv +MWRCwZcQ/15Yo6aSvgUCYrG+GgIbDAAKCRAQ/15Yo6aSvtGyAQC1KVUQeuQug4te +s0wU6UYAUGhcxAuWrPj3YQwCpn3VtwD9Gec12xj2FgTX8iqA4GDRvgDSl0CuDIiV +CdQyu5eXkQI= +=+tlo +-----END PGP PRIVATE KEY BLOCK-----