Publish to Maven Central #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish to Maven Central | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '11' | |
- name: Remove SNAPSHOT from version | |
run: sed -i 's/-SNAPSHOT//g' gradle.properties | |
- name: Build and upload archives to the Maven Central Repository | |
run: ./gradlew guia:publishAllPublicationsToMavenCentralRepository | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.PGP_SIGNING_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.PGP_SIGNING_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.PGP_SIGNING_PASSWORD }} | |
- name: Publish release to the Maven Central Repository | |
run: ./gradlew closeAndReleaseRepository | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} |