Update publishing workflow and dependabot configuration #16
Workflow file for this run
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: Publish | |
| on: | |
| push: | |
| branches: [ publishing ] | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup gradle | |
| uses: gradle/gradle-build-action@v2 | |
| - name: Check api | |
| run: ./gradlew apiCheck | |
| release: | |
| name: Release to Sonatype | |
| if: ${{ github.event_name != 'pull_request' }} | |
| runs-on: macos-latest | |
| needs: | |
| - check | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup gradle | |
| uses: gradle/gradle-build-action@v2 | |
| # Updated to 16.3 to meet Kotlin 2.2.10 requirements | |
| - name: Set up Xcode version | |
| run: sudo xcode-select -s /Applications/Xcode_26.2.app/Contents/Developer | |
| - name: Publish to MavenCentral | |
| if: ${{ github.event_name != 'pull_request' }} | |
| run: ./gradlew publishToMavenCentral --no-configuration-cache | |
| env: | |
| ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} | |
| ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_KEY_ID }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_KEY_PASSWORD }} | |
| ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY_SECRET}} | |
| documentation: | |
| name: Publish documentation | |
| if: ${{ github.event_name != 'pull_request' }} | |
| runs-on: macos-latest | |
| needs: | |
| - check | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup JDK 17 | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Setup gradle | |
| uses: gradle/gradle-build-action@v2 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v3 | |
| - name: Generate api docs with dokka | |
| run: ./gradlew dokkaGenerate | |
| - name: Upload pages | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs | |
| - name: Release to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |