Skip to content
Open
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
66 changes: 0 additions & 66 deletions .github/workflows/release-thin.yml

This file was deleted.

30 changes: 27 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,15 @@ jobs:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE

- name: Publish to the Maven Central Repository
- name: Configure GPG
run: |
# Deploy main artifacts (uber JAR, sources, javadoc)
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
gpg-connect-agent reloadagent /bye

- name: Publish shaded JAR to Maven Central
run: |
# Deploy main artifacts (shaded uber JAR, sources, javadoc)
mvn -Prelease --batch-mode deploy \
-Dnvd.api.key=${{ secrets.NVD_API_KEY }} \
-Dossindex.username=${{ secrets.OSSINDEX_USERNAME }} \
Expand All @@ -39,8 +45,26 @@ jobs:
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

- name: Publish thin JAR as separate artifact to Maven Central
run: |
VERSION=$(grep -m1 '<version>' pom.xml | sed 's/.*<version>\(.*\)<\/version>.*/\1/')
mvn -Prelease gpg:sign-and-deploy-file \
-Dfile="target/databricks-jdbc-${VERSION}-thin.jar" \
-DpomFile=thin_public_pom.xml \
-DrepositoryId=central \
-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/ \
-DgroupId=com.databricks \
-DartifactId=databricks-jdbc-thin \
-Dversion="${VERSION}" \
-Dpackaging=jar \
-Dgpg.passphrase="${GPG_PASSPHRASE}"
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}

- name: Create GitHub release
uses: softprops/action-gh-release@v1
with:
files: |
files: target/*.jar
target/*.jar
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,30 @@
</excludes>
</configuration>
</plugin>
<!-- Attach unshaded JAR before shade plugin runs -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version>
<executions>
<execution>
<id>attach-thin-jar</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.build.finalName}.jar</file>
<type>jar</type>
<classifier>thin</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
Loading