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 d645c08
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 31 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-private-key: GPG_PRIVATE_KEY
gpg-passphrase: SIGN_KEY_PASS
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)
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
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
45 changes: 23 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,37 +270,27 @@
</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>
<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 @@ -319,6 +309,17 @@
</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>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit d645c08

Please sign in to comment.