Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.9.20 #48
This file contains hidden or 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: build | |
| on: | |
| pull_request: {} | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - 'main' | |
| tags-ignore: | |
| - '**' | |
| env: | |
| GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
| jobs: | |
| jvm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Configure JDK | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 17 | |
| - name: Test | |
| run: | | |
| ./gradlew build --stacktrace --warning-mode all | |
| publish-snapshot: | |
| name: Publish to Maven Central | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'pkware/pk-wire-grpc-server' && github.ref == 'refs/heads/main' | |
| needs: [jvm] | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| persist-credentials: false | |
| - name: Configure JDK | |
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 17 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 # zizmor: ignore[cache-poisoning] | |
| - name: Publish to Maven Central | |
| run: ./gradlew publish | |
| env: | |
| ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | |
| ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | |
| ORG_GRADLE_PROJECT_SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
| ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
| ORG_GRADLE_PROJECT_SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
| - name: Check if release version | |
| id: version-check | |
| run: | | |
| version=$(./gradlew properties -q | grep "^version:" | cut -d' ' -f2) | |
| if [[ "$version" != *"-SNAPSHOT" ]]; then | |
| echo "is_release=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Notify Central Publisher Portal | |
| if: steps.version-check.outputs.is_release == 'true' | |
| run: | | |
| token=$(echo -n "${{ secrets.NEXUS_USERNAME }}:${{ secrets.NEXUS_PASSWORD }}" | base64) | |
| curl -X POST \ | |
| --max-time 30 \ | |
| --fail-with-body \ | |
| -H "Authorization: Bearer $token" \ | |
| "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/com.pkware.wiregrpcserver?publishing_type=automatic" |