Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisRev committed Sep 28, 2023
1 parent c2a9621 commit 5324e4a
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/githubpages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: githubpages

on:
release:
types: [published]

env:
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.kotlin.dsl.internal.io.timeout=120000 -Dorg.gradle.jvmargs="-Xmx5g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8"

jobs:
githubpages:
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Dokka
id: Dokka
run: ./gradlew -Pversion=${{ github.event.release.tag_name }} dokkaHtml

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
33 changes: 33 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Build"

on:
pull_request:
paths-ignore:
- '*.md'
push:
branches:
- main

env:
JAVA_OPTS: -Xms1g -Xmx3g
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: Build
uses: gradle/gradle-build-action@v2
with:
arguments: build
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Publish library"

on:
workflow_dispatch:
branches: [main]
inputs:
version:
description: 'Version'
required: true
type: string

env:
JAVA_OPTS: -Xms1g -Xmx3g
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
ORG_GRADLE_PROJECT_mavenCentralUsername: '${{ secrets.SONATYPE_USER }}'
ORG_GRADLE_PROJECT_mavenCentralPassword: '${{ secrets.SONATYPE_PWD }}'
ORG_GRADLE_PROJECT_signingInMemoryKeyId: '${{ secrets.SIGNING_KEY_ID }}'
ORG_GRADLE_PROJECT_signingInMemoryKey: '${{ secrets.SIGNING_KEY }}'
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: '${{ secrets.SIGNING_KEY_PASSPHRASE }}'

jobs:
publish:
timeout-minutes: 30
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11

- name: assemble
uses: gradle/gradle-build-action@v2
with:
arguments: assemble -Pversion=${{ inputs.version }}

- name: Upload reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: 'reports-${{ matrix.os }}'
path: '**/build/reports/**'

- name: Publish final version
uses: gradle/gradle-build-action@v2
with:
arguments: -Pversion=${{ inputs.version }} publishAllPublicationsToMavenCentralRepository
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: "Build"
name: "Pull Request"

on: [pull_request, push]
on: [pull_request]

env:
JAVA_OPTS: -Xms1g -Xmx3g
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"

jobs:

build:
runs-on: ubuntu-latest

Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[versions]
arrowGradle = "0.12.0-rc.6"
dokka = "1.8.10"
kotlin = "1.8.10"
dokka = "1.9.0"
kotlin = "1.9.10"

[libraries]

Expand Down

0 comments on commit 5324e4a

Please sign in to comment.