Skip to content

Merge pull request #41 from fleeksoft/develop #76

Merge pull request #41 from fleeksoft/develop

Merge pull request #41 from fleeksoft/develop #76

Workflow file for this run

name: Build
on:
push:
branches: [ "release" ]
paths-ignore: [ "**.md" ]
pull_request:
branches: [ "release" ]
paths-ignore: [ "**.md" ]
jobs:
build:
strategy:
matrix:
config: [
{ target: android, os: ubuntu-latest, tasks: testDebugUnitTest testReleaseUnitTest, continueOnError: false },
{ target: apple, os: macos-latest, tasks: iosX64Test iosSimulatorArm64Test macosX64Test macosArm64Test tvosX64Test tvosSimulatorArm64Test watchosSimulatorArm64Test, continueOnError: false },
{ target: js, os: ubuntu-latest, tasks: jsTest wasmTest, continueOnError: false },
{ target: desktop, os: ubuntu-latest, tasks: jvmTest, continueOnError: false },
{ target: windows, os: windows-latest, tasks: mingwX64Test, continueOnError: false },
]
runs-on: ${{ matrix.config.os }}
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'
- name: Setup gradle
uses: gradle/gradle-build-action@v2
- name: Test ${{ matrix.config.target }} targets
continue-on-error: ${{ matrix.config.continueOnError }}
run: ./gradlew ${{ matrix.config.tasks }} --info
working-directory: ${{ github.workspace }}
# deploy:
# if: github.ref == 'refs/heads/release'
#
# runs-on: macos-latest
# needs: [ build ]
#
# steps:
# - uses: actions/checkout@v4
#
# - name: Setup JDK
# uses: actions/setup-java@v4
# with:
# distribution: 'temurin'
# java-version: 17
#
# - uses: gradle/gradle-build-action@v3
#
# - name: Deploy to Sonatype
# run: ./gradlew :ksoup:publish :ksoup-network:publish --no-configuration-cache
# 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 }}
#
deploy_docs:
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: Setup Pages
uses: actions/configure-pages@v3
- name: Generate docs with dokka
run: ./gradlew dokkaHtmlMultiModule
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ${{ github.workspace }}/build/dokka/htmlMultiModule
- name: Release to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1