Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Java] Explore maven publishing, sonatype and alternatives #209

Merged
merged 5 commits into from
Feb 2, 2024
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
35 changes: 35 additions & 0 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish the Java SDK
on:
workflow_dispatch:
inputs:
deploy:
description: 'Deploy?'
required: true
type: boolean
jobs:
build:
name: Build and Test
if: ${{ inputs.deploy }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'corretto'

- name: Build and Test with Gradle
run: ./gradlew build

- name: Publish SDK Library to Maven Central
run: ./gradlew publishAllPublicationsToMavenCentralRepository --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }}
9 changes: 2 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,5 @@ POM_LICENCE_DIST=repo

POM_DEVELOPER_NAME=Countly

#SIGNING SECTION
signing.keyId=xx
signing.password=xx
signing.secretKeyRingFile=xx

mavenCentralUsername=xx
mavenCentralPassword=xx
# Publishing properties
SONATYPE_AUTOMATIC_RELEASE=true
Loading