From 93570471ad218a1a352bb65a47c813a7893dc597 Mon Sep 17 00:00:00 2001 From: Elizabeth Worstell Date: Wed, 15 Nov 2023 11:21:52 -0800 Subject: [PATCH] feat: publish FTL JARs to Maven Central --- .github/workflows/release.yml | 9 ++++- kotlin-runtime/ftl-generator/pom.xml | 9 +++-- kotlin-runtime/ftl-runtime/pom.xml | 9 +++-- pom.xml | 50 ++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38ec2f3a2b..fab5f24866 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -106,7 +106,14 @@ jobs: - name: Publish JARs run: | mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false - mvn --batch-mode deploy + mvn release:clean release:prepare release:perform \ + --batch-mode \ + -DreleaseVersion=$(git describe --tags --abbrev=0 | cut -c2-) \ + -Dtag=$(git describe --tags --abbrev=0) \ + -Dsonatype.username=${{ secrets.SONATYPE_USERNAME }} \ + -Dsonatype.password=${{ secrets.SONATYPE_PASSWORD }} \ + -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} \ + -DserverId=ossrh env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} create-release: diff --git a/kotlin-runtime/ftl-generator/pom.xml b/kotlin-runtime/ftl-generator/pom.xml index 554487dfb5..cd99df202c 100644 --- a/kotlin-runtime/ftl-generator/pom.xml +++ b/kotlin-runtime/ftl-generator/pom.xml @@ -91,10 +91,13 @@ + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + - github - GitHub Packages - https://maven.pkg.github.com/TBD54566975/ftl + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ diff --git a/kotlin-runtime/ftl-runtime/pom.xml b/kotlin-runtime/ftl-runtime/pom.xml index 548079e26b..7b97e59e8c 100644 --- a/kotlin-runtime/ftl-runtime/pom.xml +++ b/kotlin-runtime/ftl-runtime/pom.xml @@ -98,10 +98,13 @@ + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + - github - GitHub Packages - https://maven.pkg.github.com/TBD54566975/ftl + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index da94c0eccf..9b35bce9d2 100644 --- a/pom.xml +++ b/pom.xml @@ -266,7 +266,57 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-release-plugin + 3.0.1 + + true + false + release + deploy + + + + + + release + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.1.0 + + + sign-artifacts + verify + + sign + + + 0x088BCD86 + gpg.passphrase + + + + + + + + \ No newline at end of file