From ffe7a76dac703f8bac27b522f0680a4004714c34 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 | 6 ++++- kotlin-runtime/ftl-generator/pom.xml | 9 ++++--- kotlin-runtime/ftl-runtime/pom.xml | 9 ++++--- pom.xml | 40 ++++++++++++++++++++++++++++ 4 files changed, 57 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 38ec2f3a2b..b2acde21a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -103,10 +103,14 @@ jobs: with: java-version: "11" distribution: "temurin" + - name: Set up Maven settings + run: | + apt-get install gnupg + echo "${{ secrets.MAVEN_SETTINGS_XML }}" > $HOME/.m2/settings.xml - 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=${{ github.event_name == 'push' && github.ref == 'refs/tags/v*' && github.ref }} -Dtag=v${{ github.ref_name == 'refs/tags/v*' && github.ref }} 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..b1e1ce2a3e 100644 --- a/pom.xml +++ b/pom.xml @@ -266,6 +266,46 @@ + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + 0x088BCD86 + gpg.passphrase + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + true + false + release + deploy + +