Skip to content

Publish

Publish #6

Workflow file for this run

name: Publish
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 17
distribution: temurin
- name: Setup Gradle
uses: gradle/[email protected]
- name: Build
run: ./gradlew publish --scan
env:
PUBLISHING: true
ORG_GRADLE_PROJECT_githubUsername: boswelja
ORG_GRADLE_PROJECT_githubToken: ${{ secrets.GITHUB_TOKEN }}
ORG_GRADLE_PROJECT_ossrhUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_ossrhPassword: ${{ secrets.OSSRH_PASSWORD }}
upload-pages:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Java JDK
uses: actions/[email protected]
with:
java-version: 17
distribution: temurin
- name: Setup Gradle
uses: gradle/[email protected]
- name: Build
run: ./gradlew dokkaHtmlMultiModule
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v2
with:
path: "build/dokka/"
deploy-pages:
runs-on: ubuntu-latest
needs: upload-pages
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2