Skip to content

Commit

Permalink
feat: publish FTL JARs to Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell committed Nov 15, 2023
1 parent f737be3 commit ffe7a76
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 6 additions & 3 deletions kotlin-runtime/ftl-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/TBD54566975/ftl</url>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>
9 changes: 6 additions & 3 deletions kotlin-runtime/ftl-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,13 @@
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/TBD54566975/ftl</url>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>
40 changes: 40 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,46 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>0x088BCD86</keyname>
<passphraseServerId>gpg.passphrase</passphraseServerId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down

0 comments on commit ffe7a76

Please sign in to comment.