Publish to Maven Central #25
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: workflow_dispatch | |
env: | |
NEW_VERSION: ${{ github.event.inputs.version }} | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALUSERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_MAVENCENTRALPASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGINMEMORYKEYPASSWORD }} | |
jobs: | |
validate: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Validate Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: zulu | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Ensure main branch | |
run: ./.github/sh/validate_publishing_branch.sh | |
- name: Validate publishing | |
run: | | |
./gradlew \ | |
-xtest \ | |
-xlint \ | |
publishToMavenLocal | |
- name: Publishing | |
run: ./gradlew publishToMavenCentral |