Skip to content

Publish package to maven central #4

Publish package to maven central

Publish package to maven central #4

Workflow file for this run

name: Publish package to maven central
on:
workflow_dispatch:
jobs:
test:
uses: ./.github/workflows/test.yml
sonar-scan:
needs: [test]
uses: ./.github/workflows/sonar_scanner.yml
secrets: inherit
build-and-publish:
needs: [test, sonar-scan]
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle 8.9
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: 8.9
- name: Build Lib
run: ./gradlew :lib:build
- name: Publish package
run: ./gradlew :lib:publishAndReleaseToMavenCentral --no-configuration-cache
env:
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_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}