Add Decompose Router APIs for pages and slots #188
Workflow file for this run
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: Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
# This allows a subsequently queued workflow run to interrupt previous runs | |
concurrency: | |
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}' | |
cancel-in-progress: true | |
# 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 | |
name: Verify API | |
permissions: | |
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 | |
build: | |
strategy: | |
fail-fast: true | |
matrix: | |
config: [ | |
{ target: jvm, os: ubuntu-latest }, | |
{ target: apple, os: macos-latest }, | |
] | |
runs-on: ${{ matrix.config.os }} | |
timeout-minutes: 60 | |
needs: | |
- check | |
name: Build ${{ matrix.config.target }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v2 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
release: | |
name: Release to sonatype | |
if: ${{ github.event_name != 'pull_request' }} | |
runs-on: macos-latest | |
needs: | |
- build | |
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: Write secrets to local.properties | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
echo sonatypeUsername="${SONATYPE_USERNAME}" >> "local.properties" | |
echo sonatypePassword="${SONATYPE_PASSWORD}" >> "local.properties" | |
echo gpgKeyPassword="${GPG_KEY_PASSWORD}" >> "local.properties" | |
echo gpgKeySecret="${GPG_KEY_SECRET}" >> "local.properties" | |
env: | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }} | |
GPG_KEY_SECRET: ${{ secrets.GPG_KEY_SECRET }} | |
- name: Release to sonatype | |
run: ./gradlew publishAllPublicationsToMavenRepository | |
documentation: | |
name: Publish documentation | |
if: ${{ github.event_name != 'pull_request' }} | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
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 dokkaHtmlMultiModule | |
- name: Build Writerside docs using Docker | |
uses: JetBrains/writerside-github-action@v4 | |
with: | |
instance: docs/decompose-router | |
artifact: webHelpKSTORE2-all.zip | |
docker-version: 232.10275 | |
- name: Upload documentation | |
uses: actions/upload-artifact@v3 | |
with: | |
name: docs | |
path: | | |
artifacts/webHelpKSTORE2-all.zip | |
artifacts/report.json | |
retention-days: 7 | |
- name: Unzip artifact | |
uses: montudor/action-zip@v1 | |
with: | |
args: unzip -qq artifacts/webHelpDECOMPOSE-ROUTER2-all.zip -d build/docs | |
- name: Move dokka api-doc to docs/api | |
run: | | |
sudo mkdir -p build/docs/api | |
sudo mv build/dokka/htmlMultiModule/* build/docs/api | |
- name: Upload pages | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ${{ github.workspace }}/build/docs | |
- name: Release to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |