Skip to content

Commit

Permalink
debugging release.yml to publish JARs
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell committed Nov 16, 2023
1 parent b486a2d commit efc82fd
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 33 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,22 @@ jobs:
with:
java-version: "11"
distribution: "temurin"
server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-passphrase: SIGN_KEY_PASS
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
cache: 'maven'
- name: Publish JARs
run: |
git config user.name github-actions
git config user.email [email protected]
mvn release:clean release:prepare release:perform \
--batch-mode \
mvn -U -B clean deploy -P release \
-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
-Dtag=$(git describe --tags --abbrev=0)
--projects ftl-runner,ftl-controller
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GITHUB_TOKEN: ${{ github.token }}
create-release:
name: Release Go Binaries
Expand Down
1 change: 1 addition & 0 deletions kotlin-runtime/ftl-generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
</build>

<distributionManagement>
<!-- Central Repository -->
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
Expand Down
1 change: 1 addition & 0 deletions kotlin-runtime/ftl-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
</build>

<distributionManagement>
<!-- Central Repository -->
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
Expand Down
53 changes: 29 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,37 +270,28 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</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-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

<profiles>
<profile>
<!-- Release profile (required so these plugins are only used when releasing) -->
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<scmCommentPrefix>[ci skip]</scmCommentPrefix>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
<releaseProfiles>release</releaseProfiles>
<goals>deploy</goals>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -313,12 +304,26 @@
<goal>sign</goal>
</goals>
<configuration>
<keyname>0x088BCD86</keyname>
<passphraseServerId>gpg.passphrase</passphraseServerId>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<skipNexusStagingDeployMojo>${maven.deploy.skip}</skipNexusStagingDeployMojo>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit efc82fd

Please sign in to comment.