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

Fixing Maven Automated Publish #983

Merged
merged 2 commits into from
Jan 18, 2023
Merged
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
23 changes: 13 additions & 10 deletions .github/workflows/publish-to-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,27 @@ jobs:
java-version: "8"
distribution: "temurin"
server-id: ossrh
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
server-username: ORG_GRADLE_PROJECT_mavenCentralUsername
server-password: ORG_GRADLE_PROJECT_mavenCentralPassword
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: PGP_PASSPHRASE
gpg-passphrase: ORG_GRADLE_PROJECT_signingInMemoryKeyPassword

# CI release command defaults to publishSigned
# Sonatype release command defaults to sonaTypeBundleRelease
- name: Gradle publish
run: gradle clean publish
# Changing env names as documented here - https://vanniktech.github.io/gradle-maven-publish-plugin/central/#secrets
- name: Gradle Build and Publish to Maven central
run: |
./gradlew publish
./gradlew closeAndReleaseRepository
env:
PGP_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
PGP_SECRET: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}

# Publish Released Fat Jar to Blob Storage
- name: Gradle build
run: |
run: |
./gradlew build
# remote folder for CI upload
echo "CI_SPARK_REMOTE_JAR_FOLDER=feathr_jar_release" >> $GITHUB_ENV
Expand Down