Merge pull request #5 from LDRAlighieri/update/dependencies #12
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2.4.2 | |
- name: Check spotless | |
run: ./gradlew spotlessCheck --no-configuration-cache | |
- name: Build the sample app to verify it works | |
run: ./gradlew sample:assemble | |
- name: Deploy to Sonatype | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: | | |
./gradlew publish --no-parallel \ | |
--max-workers 1 \ | |
-Dorg.gradle.internal.http.connectionTimeout=120000 \ | |
-Dorg.gradle.internal.http.socketTimeout=120000 | |
env: | |
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }} |