diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..890b6f4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: Gradle build + +on: + push: + branches: [ dev ] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4.1.7 + - name: Set up JDK 17 + uses: actions/setup-java@v4.2.1 + with: + java-version: 17 + distribution: liberica + - name: execute build + uses: gradle/gradle-build-action@v3.4.2 + with: + arguments: build diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..af8f681 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,39 @@ +name: Dokka publication + +on: + push: + branches: [ main ] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: liberica + - name: execute build + uses: gradle/gradle-build-action@v3 + with: + arguments: dokkaHtmlMultiModule + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'build/dokka/htmlMultiModule' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..27e9992 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: Gradle publish + +on: + workflow_dispatch: + release: + types: [ created ] + +jobs: + publish: + environment: + name: publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4.1.7 + - name: Set up JDK 17 + uses: actions/setup-java@v4.2.1 + with: + java-version: 17 + distribution: liberica + - name: execute build + uses: gradle/gradle-build-action@v3.4.2 + - name: Publish + shell: bash + run: > + ./gradlew release --no-daemon --build-cache -Ppublishing.enabled=true + -Ppublishing.space.user=${{ secrets.SPACE_APP_ID }} + -Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }} diff --git a/gradlew b/gradlew old mode 100644 new mode 100755