Bumped docs deps #495
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 | |
env: | |
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" | |
RUNNING_ON_CI: "true" | |
LC_ALL: C.UTF-8 | |
LANG: C.UTF-8 | |
on: [push, pull_request] | |
jobs: | |
build: | |
name: Build and test | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Install JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: "gradle" | |
check-latest: true | |
- name: Configure Gradle | |
run: | |
./gradlew help | |
./gradlew --version | |
- name: Build project | |
run: ./gradlew assemble --stacktrace | |
- name: Run tests | |
run: ./gradlew testAll --stacktrace | |
# TODO: switch to Kover | |
# - name: Create coverage report | |
# run: ./gradlew jacocoTestReportDefault | |
- name: Final checks | |
run: ./gradlew ktlint | |
# Publish packages | |
- name: Decode key | |
if: startsWith(github.ref, 'refs/tags/v0') || startsWith(github.ref, 'refs/tags/v1') || startsWith(github.ref, 'refs/tags/v2') || startsWith(github.ref, 'refs/tags/v3') || startsWith(github.ref, 'refs/tags/v4') || startsWith(github.ref, 'refs/tags/v5') || startsWith(github.ref, 'refs/tags/v6') || startsWith(github.ref, 'refs/tags/v7') || startsWith(github.ref, 'refs/tags/v8') || startsWith(github.ref, 'refs/tags/v9') | |
run: | | |
set -euo pipefail | |
mkdir -p .credentials | |
echo "$SIGNING_KEY_RING" | base64 -d > ".credentials/$SIGNING_KEY_ID.gpg" | |
env: | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_KEY_RING: ${{ secrets.SIGNING_KEY_RING }} | |
- name: Publish package | |
if: startsWith(github.ref, 'refs/tags/v0') || startsWith(github.ref, 'refs/tags/v1') || startsWith(github.ref, 'refs/tags/v2') || startsWith(github.ref, 'refs/tags/v3') || startsWith(github.ref, 'refs/tags/v4') || startsWith(github.ref, 'refs/tags/v5') || startsWith(github.ref, 'refs/tags/v6') || startsWith(github.ref, 'refs/tags/v7') || startsWith(github.ref, 'refs/tags/v8') || startsWith(github.ref, 'refs/tags/v9') | |
run: ./gradlew publishToMavenCentral closeAndReleaseMavenCentralStagingRepository | |
env: | |
PUBLICATION_USERNAME: ${{ secrets.PUBLICATION_USERNAME }} | |
PUBLICATION_PASSWORD: ${{ secrets.PUBLICATION_PASSWORD }} | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} | |
- name: Bundle the build report | |
if: failure() | |
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip | |
- name: Upload the build report | |
if: failure() | |
uses: actions/upload-artifact@master | |
with: | |
name: error-report | |
path: build-reports.zip | |
docs: | |
name: Publish docs | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
if: startsWith(github.ref, 'refs/heads/_publish') || startsWith(github.ref, 'refs/tags/v0') || startsWith(github.ref, 'refs/tags/v1') || startsWith(github.ref, 'refs/tags/v2') || startsWith(github.ref, 'refs/tags/v3') || startsWith(github.ref, 'refs/tags/v4') || startsWith(github.ref, 'refs/tags/v5') || startsWith(github.ref, 'refs/tags/v6') || startsWith(github.ref, 'refs/tags/v7') || startsWith(github.ref, 'refs/tags/v8') || startsWith(github.ref, 'refs/tags/v9') | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: "gradle" | |
check-latest: true | |
- name: Build project | |
run: ./gradlew assemble --stacktrace | |
- name: Install common deps | |
run: sudo scripts/build-common.sh | |
- name: Install Python deps | |
run: poetry install | |
- name: Deploy docs | |
run: ./deploy-docs.sh | |
env: | |
GH_PAGES_DEPLOY_KEY: ${{ secrets.GH_PAGES_DEPLOY_KEY }} |