Update hidden-characters action to v1.0-beta02 #61
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: macos-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 for Invisible Characters | |
| uses: hakz/hidden-characters@v1.0-beta02 | |
| with: | |
| path: "./basic-ads" | |
| - name: Check API | |
| run: ./gradlew apiCheck | |
| - name: Generate kover coverage report | |
| run: ./gradlew koverXmlReport | |
| - name: Add coverage report to PR | |
| if: ${{ github.event_name == 'pull_request' }} | |
| id: kover | |
| uses: mi-kas/kover-report@v1 | |
| with: | |
| path: ${{ github.workspace }}/basic-ads/build/reports/kover/report.xml | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| title: Code Coverage | |
| update-comment: true | |
| min-coverage-overall: 00 | |
| min-coverage-changed-files: 00 | |
| 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 |