Skip to content

Update dependency gradle to v8.7 (#224) #544

Update dependency gradle to v8.7 (#224)

Update dependency gradle to v8.7 (#224) #544

Workflow file for this run

name: Publish
on:
push:
tags: [ 'v*' ]
branches: [ main ]
jobs:
publish:
runs-on: macos-latest
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKey }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.ORG_GRADLE_PROJECT_signingInMemoryKeyPassword }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralPassword }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.ORG_GRADLE_PROJECT_mavenCentralUsername }}
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Cache Build files
uses: actions/cache@v4
if: ${{ !startsWith(matrix.os, 'windows') }}
with:
path: |
~/.konan
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}-v1
- uses: gradle/gradle-build-action@v3.3.2
name: Publish
with:
arguments: clean publishAllPublicationsToMavenCentralRepository
publish-docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
submodules: true
fetch-depth: 0
- name: Cache Build files
uses: actions/cache@v4
with:
path: |
~/.konan
~/.gradle
key: ${{ runner.os }}-${{ hashFiles('gradle.properties') }}
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
architecture: x64
cache: 'pip'
cache-dependency-path: 'docs/requirements.txt'
- name: Install Python dependencies
run: python3 -m pip install -r ./docs/requirements.txt
- uses: gradle/gradle-build-action@v3.3.2
name: Build KDocs
with:
arguments: clean dokkaHtmlMultiModule
- name: Move KDoc build
run: mv build/dokka/htmlMultiModule docs/kdoc
- name: Deploy with mike (release)
if: startsWith(github.ref, 'refs/tags/v')
run: |
VERSION=${GITHUB_REF_NAME#v} mike deploy --update-aliases --push ${{ github.ref_name }} latest
- name: Deploy with mike (snapshot)
if: startsWith(github.ref, 'refs/tags/v') == false
run: |
mike delete $(mike list | grep '\[dev-snapshot\]' | awk '{printf "%s", $1}') || true
export SNAPSHOT_VERSION=$(grep "version=" gradle.properties | cut -d '=' -f2)
VERSION=$SNAPSHOT_VERSION mike deploy --update-aliases --push "v$SNAPSHOT_VERSION" dev-snapshot