Skip to content

Merge pull request #85 from solrudev/develop #142

Merge pull request #85 from solrudev/develop

Merge pull request #85 from solrudev/develop #142

Workflow file for this run

name: ci
on:
pull_request: {}
push:
branches:
- master
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
name: Build Ackpine
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Validate binary compatibility
run: |
./gradlew apiCheck || { exit_code=$?; printf "*** This PR changes Ackpine's public API. If this is intentional, run './gradlew apiDump' and commit the new API dumps. ***"; exit $exit_code; }
- name: Build
run: |
./gradlew buildAckpine --stacktrace
publish:
name: Upload artifacts
runs-on: ubuntu-latest
if: github.repository == 'solrudev/Ackpine' && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, '[docs]')
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Publish
run: |
./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
publish-docs:
name: Publish documentation
runs-on: ubuntu-latest
if: github.repository == 'solrudev/Ackpine' && github.ref == 'refs/heads/master'
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 17
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11.4
- name: Prepare API docs
run: |
./gradlew dokkaHtmlMultiModule
- name: Build MkDocs
run: |
pip3 install --upgrade pip && pip3 install -v "mkdocs-material==9.3.2" && pip3 install mkdocs-minify-plugin
mkdocs build
- name: Deploy docs
if: success()
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
BRANCH: gh-pages
FOLDER: site
SINGLE_COMMIT: true