Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,28 @@ jobs:
java-version: 8
server-id: central
distribution: "adopt"
server-username: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
server-username: MAVEN_CENTRAL_USERNAME
server-password: MAVEN_CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the issue with the old way?
Why it does not apply to the private key?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just changed this to the old behavior that we changed here. I actually can't figure out where this key is exactly used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue with the current behaviour is that the secret is passed in the format of {env.Secret}. Which corrupts the secret.

gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }}

gpg-passphrase: GPG_PASSPHRASE
# This step runs ONLY on branch pushes (dry-run)
- name: Run Release Dry-Run (Verify)
if: "!startsWith(github.ref, 'refs/tags/')"
run: mvn -Prelease -DskipTests=true --batch-mode verify
env:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No private key needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto reason.
I just changed this to the old behavior that we changed here. I actually can't figure out where this key is exactly used.

GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

# This step runs ONLY on tag pushes (real release)
- name: Publish to Maven Central Repository (Deploy)
if: "startsWith(github.ref, 'refs/tags/')"
run: mvn -Prelease -DskipTests=true --batch-mode deploy
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

# This step also runs ONLY on tag pushes (real release)
- name: Create GitHub release
Expand Down
1 change: 1 addition & 0 deletions databricks-sdk-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<version>0.55.0</version>
</parent>
<artifactId>databricks-sdk-java</artifactId>
<name>Databricks SDK for Java</name>
<properties>
<httpclient.version>4.5.14</httpclient.version>
<jackson.version>2.15.2</jackson.version>
Expand Down
21 changes: 21 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,27 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<!-- Prevent gpg from using pinentry programs -->
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
Expand Down
Loading